I have a single Toggle button (tglMultipleTransactions) that I would like to control 20 other toggle buttons on a form( the other buttons make a change to the DefaultValue property for individual fields on a form to copy to a NewRecord for ease of multiple entries)
I am stumped as to how to code the event to turn on then turn off when the state of (tglMultipleTransactions) changes.
My code...
Thanks in advance for your time..
Donald M
I am stumped as to how to code the event to turn on then turn off when the state of (tglMultipleTransactions) changes.
My code...
Code:
Private Sub tglMultipleTransactions_BeforeUpdate(Cancel As Integer)
Dim proceed As Boolean
If Me!tglMultipleTransactions = False Then
'Would You Like to Turn On?
proceed = MsgBox("Do you want to set fields to copy to new records?", _
vbYesNo, "Copy for Multiple Transactions?")
If proceed = vbYes Then
'Turn On
Me!tglCompanyID.Value = True
etc
etc
Else
'Leave Alone
End If
Else
'Would you like to turn off?
proceed = MsgBox("Do you want to remove the set fields to copy to new record function?", _
vbYesNo, "Remove Copy for Multiple Transactions?")
If proceed = vbYes Then
'Turn Off
Me!tglCompanyID.Value = False
Me!tglEISRNumber.Value = False
etc
etc
etc
Else
'Leave Alone
End If
End If
End Sub
Thanks in advance for your time..
Donald M