T
Tahlmorrah
I am getting a Runtime error: '424' Object Required with the following code:
Private Sub ParticipantName_BeforeUpdate(Cancel As Integer)
cmbxAccount = sAcc
tDate = dDate
[Call] = bCall + 1
If Me.[ParticipantName] Is Incorrect Then
MsgBox ("Particpant is not valid.")
[ParticipantName].Undo
DoCmd.GoToControl ("ParticipantName")
Cancel = True
End If
End Sub
If I Debug it jumps to 'If Me.[ParticipantName] Is Incorrect Then'. Do a
Mouse Over Me.[ParticipantName] = "Test Name 1" and
Mouse Over Incorrect = Empty. Most of the time a 424 means I do not have my
field names correct, but since debug is returning a value I know that is not
the case.
ParticipantName rule on table is Required only.
Code was suggested by Matthew DeAngelis in the question "Where to put
validation code on a form's module?" originally posted 8/18/2004 11:05 AM PST
I am now also told that Incorrect is not a standard VB or Access command
(but it does seem to be working as intended.
What am I doing wrong???? What can I use instead to validate this record?
Private Sub ParticipantName_BeforeUpdate(Cancel As Integer)
cmbxAccount = sAcc
tDate = dDate
[Call] = bCall + 1
If Me.[ParticipantName] Is Incorrect Then
MsgBox ("Particpant is not valid.")
[ParticipantName].Undo
DoCmd.GoToControl ("ParticipantName")
Cancel = True
End If
End Sub
If I Debug it jumps to 'If Me.[ParticipantName] Is Incorrect Then'. Do a
Mouse Over Me.[ParticipantName] = "Test Name 1" and
Mouse Over Incorrect = Empty. Most of the time a 424 means I do not have my
field names correct, but since debug is returning a value I know that is not
the case.
ParticipantName rule on table is Required only.
Code was suggested by Matthew DeAngelis in the question "Where to put
validation code on a form's module?" originally posted 8/18/2004 11:05 AM PST
I am now also told that Incorrect is not a standard VB or Access command
(but it does seem to be working as intended.
What am I doing wrong???? What can I use instead to validate this record?