SimonPGreen
IS-IT--Management
Hi,
I have some code using the Dmax function in the current event of a form. I need to stop this code from running based on a user response on form load
If the user clicks no the form still seems to go through its event sequence before the closing events - how can I stop this?
Appreciate any help.
Regards,
Simon
I have some code using the Dmax function in the current event of a form. I need to stop this code from running based on a user response on form load
Code:
If Me.NewRecord And Me.OpenArgs <> "" Then
Select Case msgbox("No Packages found. Create new?", vbYesNo)
Case Is = vbYes
Me!FKContractRef = Me.OpenArgs
Case Is = vbNo
DoCmd.Close
Exit Sub
Case Else
DoCmd.Close
Exit Sub
End Select
End If
Appreciate any help.
Regards,
Simon