Paul Cooke
Registered User.
- Local time
- Today, 14:35
- Joined
- Oct 12, 2001
- Messages
- 288
would someone mind having a look at the following code please - I can't work out why the form does not close on the doCmd bit at the bottom.
Many thanks for any adice offered.
Code:
If IsNull(Me.cboProductionEmployerName) Then
vbResponse = MsgBox("You have not enterted a Production or Employer Name." & vbCrLf & vbCrLf & _
"Do you have a Production or Event Title?", vbQuestion + vbYesNo, "Production / Event Title")
If vbResponse = vbYes Then
Me.cboProductonEventTitle.Enabled = True
Me.cboProductonEventTitle.SetFocus
Else
If vbResponse = vbNo Then
vbResponse = MsgBox("As you do not have a Production or Employer Name or a Production or Event Title, you can not continue entering details on this database form." & _
vbCrLf & vbCrLf & "If the patient is with you, please complete a paper treatment form." & vbCrLf & vbCrLf & _
"Otherwise please click 'ok' below to continue.", vbInformation + vbOKOnly, "Cancel Data Entry")
If vbResponse = vbOK Then
MsgBox "Please put the form in question to one side and email Paul with the details", vbInformation, "Cancel Data Entry"
End If
DoCmd.Close acForm, ("Newtreatment"), acSaveNo
DoCmd.OpenForm "Navigation"
Many thanks for any adice offered.