I am trying to prevent a user from entering data without a Bank Account,here is my code: It opens BankInformation if I choose NO?
Results in a blank record. I also need to set Bank to Null if New Record and if they answer NO, then they must choose a bank form list.
If Me.NewRecord = True Then
Dim Programmermsgbox As String
Programmermsgbox = MsgBox("WARNING:New Bank Account Detected,Answer Yes and Create a New Bank Account or else Enter a Bank!", vbInformation + vbYesNo, "FReg")
If vbYes Then
DoCmd.OpenForm "BankInformation"
Else: If vbNo Then Me.Bank.SetFocus
Cancel = True
End If