Paul Cooke
Registered User.
- Local time
- Today, 04:36
- Joined
- Oct 12, 2001
- Messages
- 288
hi guys,
well after hours of searching I really cannot figure out why my form is not closing using docmd.
I have form1 which you select a name from this enables an option group where you choose the form type, click a command button and form2 opens.
all the fields on form2 are disabled except the first field (title)
This is the actual code in the lostevent of that field
I need something to put at the end to close this form and open the navgation form.
I have tried all types of docmd.close but nothing seems to work I keep getting Run time error 2585 - This action can't be carried out while processing a form or report event.
opening another form is not a problem
I am tottally lossed please could someone help me with this
many thanks
well after hours of searching I really cannot figure out why my form is not closing using docmd.
I have form1 which you select a name from this enables an option group where you choose the form type, click a command button and form2 opens.
all the fields on form2 are disabled except the first field (title)
This is the actual code in the lostevent of that field
Code:
Private Sub cboProductonEventTitle_LostFocus()
Dim Response As Integer
If IsNull(Me.cboProductonEventTitle) = True Then
Response = 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 Response = vbOK Then
Response = MsgBox("Please put the form in question to one side and email Paul with the details", vbInformation + vbOKOnly, "Cancel Data Entry")
End If
End If
End Sub
I need something to put at the end to close this form and open the navgation form.
I have tried all types of docmd.close but nothing seems to work I keep getting Run time error 2585 - This action can't be carried out while processing a form or report event.
opening another form is not a problem
I am tottally lossed please could someone help me with this
many thanks