S
Sandy
I have the following code attached to my form - works fine other than when
the form is first opened. If the third "if" is true, the code runs before
the form is even open!
Any way to have the form open first before the message box displays?
Just one more small point - what syntax do I use to have the message in the
message box show on two lines and also have double quotes around "Job
Complete" (as I have just typed)?
Private Sub Form_Current()
If IsNull(txtDateCollected) Then
Me.lblJobComplete.Visible = False
Me.chkJobComplete.Visible = False
ElseIf Not IsNull(txtDateCollected) And Me.chkJobComplete = True Then
Exit Sub
ElseIf Not IsNull(txtDateCollected) And _
Not IsNull(Forms![Finalise
Jobs]![FinaliseJobDetailsSubform].Form.cboRepairer1) Then
Me.lblJobComplete.Visible = True
Me.chkJobComplete.Visible = True
MsgBox "If this job is now complete check the Job Complete check
box", vbOKCancel
Me.chkJobComplete.SetFocus
End If
End Sub
Thanks
Sandy
the form is first opened. If the third "if" is true, the code runs before
the form is even open!
Any way to have the form open first before the message box displays?
Just one more small point - what syntax do I use to have the message in the
message box show on two lines and also have double quotes around "Job
Complete" (as I have just typed)?
Private Sub Form_Current()
If IsNull(txtDateCollected) Then
Me.lblJobComplete.Visible = False
Me.chkJobComplete.Visible = False
ElseIf Not IsNull(txtDateCollected) And Me.chkJobComplete = True Then
Exit Sub
ElseIf Not IsNull(txtDateCollected) And _
Not IsNull(Forms![Finalise
Jobs]![FinaliseJobDetailsSubform].Form.cboRepairer1) Then
Me.lblJobComplete.Visible = True
Me.chkJobComplete.Visible = True
MsgBox "If this job is now complete check the Job Complete check
box", vbOKCancel
Me.chkJobComplete.SetFocus
End If
End Sub
Thanks
Sandy