on dirty

  • Thread starter Thread starter Eugene
  • Start date Start date
E

Eugene

I am trying to get the following to work:

Private Sub Nurse_Assigned_Dirty(Cancel As Integer)
If nurses.pritoday = "No" Then
msgbox("No PRIs today for this nurse" ,vbOKOnly,"No Pri Today",,)
End If

End Sub

Access keeps returning a syntax error.

What am I doing wrong?

Thanks in advance
 
Eugene,

Try the below... Note, if you have nothing for the ending parameters, leave
off the trailing commas. Also, the below is based on the fact that you are
not getting the "No" answer from the message box.

Private Sub Nurse_Assigned_Dirty(Cancel As Integer)
If nurses.pritoday = "No" Then
MsgBox "No PRIs today for this nurse" ,vbOKOnly,"No Pri Today"
End If
End Sub

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
Actually this is what happens...

A nurse is selected from a list. with in the list is a field that says if
he/she is accepting PRIs today. If the field is no, when a nurse is selected,
a msgbox shoudl pop up and say "Not today"...click on ok it will reset the
field to select a new nurse.

Thanks Gina.
 
Gina,

Maybe I am really dense, but I am getting the following error

Runtime error '424':

Object Required.

My code is as follows:

Private Sub Nurse_Assigned_Dirty(Cancel As Integer)

If nurses.pritoday = "No" Then
MsgBox "No PRIs today for this nurse", vbOKOnly, "No Pri Today"



End If
End Sub

I am not a VB expert not even close. HELP......
 
Nurses is a table, pritoday is a field in the table associated with nurse
record.

Can send you a screenprint?

My email address is eugene dot wohlfarth at wellpoint dot com

Thanks,
Eugene
 
Back
Top