L
Lori
Hi,
I pasted the following code into the "on click" event of my close form
command button and added my field name. When I run it, it stops at "Chr(13)"
and gives me the error "Compile Error -Can't find project or library". I am
new to access, please tell me what this is, do I need to change this also?
If IsNull(Me![ContactCompanyID]) Then
If MsgBox("'ContactCompanyID' must contain a value." & Chr(13) & Chr(10) & _
"Press 'OK' to return and enter a value." & Chr(13) & Chr(10) & _
"Press 'Cancel' to abort the record.", _
vbOKCancel, "A Required field is Null") = vbCancel Then
DoCmd.Close
Else
Me![ContactCompanyID].SetFocus
End If
Else
DoCmd.Close
End If
I pasted the following code into the "on click" event of my close form
command button and added my field name. When I run it, it stops at "Chr(13)"
and gives me the error "Compile Error -Can't find project or library". I am
new to access, please tell me what this is, do I need to change this also?
If IsNull(Me![ContactCompanyID]) Then
If MsgBox("'ContactCompanyID' must contain a value." & Chr(13) & Chr(10) & _
"Press 'OK' to return and enter a value." & Chr(13) & Chr(10) & _
"Press 'Cancel' to abort the record.", _
vbOKCancel, "A Required field is Null") = vbCancel Then
DoCmd.Close
Else
Me![ContactCompanyID].SetFocus
End If
Else
DoCmd.Close
End If