Una famiglia di sistemi di gestione per database relazionali di Microsoft progettati per semplificare l'uso.
Senza urlare, però. Grazie. (TUTTOMAIUSCOLO = Urlare. Che poi si fa anche fatica a leggere.)
Tutto chiaro, ora. Io avevo capito che le percentuali fossero fisse in base all'avanzamento.
Prova così:
Option Compare Database
Option Explicit
Private Sub Form_Current()
Dim intAcc As Integer
Dim sngAvan As Single
With Me
.Visible = True
sngAvan = .Avanzamento.Value
If sngAvan > .Acconto3.Value And Not (.ynAcconto3.Value) Then
intAcc = 3
ElseIf sngAvan > .Acconto2.Value And Not (.ynAcconto2.Value) Then
intAcc = 2
ElseIf sngAvan > .Acconto1.Value And Not (.ynAcconto1.Value) Then
intAcc = 1
Else
intAcc = 0
End If
If intAcc Then
If MsgBox("Vuoi richiedere il " & CStr(intAcc) & "° acconto?" _
, vbYesNo Or vbQuestion _
, "Acconto") = vbYes Then
Select Case intAcc
Case 1: .ynAcconto1.Value = True
Case 2: .ynAcconto2.Value = True
Case 3: .ynAcconto3.Value = True
Case Else
' DO NOTHING
End Select
DoCmd.OpenForm FormName:="frmAcconti" _
, View:=acNormal _
, WhereCondition:="[ID_Progetto]=" & .ID_Progetto
End If
End If
End With
End Sub