C
Charlie
Can someone help in in what to put after the THEN statment to allow one
entry if the Record count is =>1 in the Before insert or should I set the
probert after the first entry?
This code is in Before insert event in Sub Form
Private Sub Form_BeforeInsert(Cancel As Integer) ' This goes in subform "b"
If Me.CurrentRecord = 2 And Forms![MainForm].[Field in Main Form] =
"variable"
Then
Cancel = True '??????
MsgBox "You can only have one invoice per bob entry", vbInformation,
"Data Error"
End If
'From here I want to go back to the form as if I only have
one entry now and sitting as if I just called it up.
End Sub
Thank You
Charlie
entry if the Record count is =>1 in the Before insert or should I set the
probert after the first entry?
This code is in Before insert event in Sub Form
Private Sub Form_BeforeInsert(Cancel As Integer) ' This goes in subform "b"
If Me.CurrentRecord = 2 And Forms![MainForm].[Field in Main Form] =
"variable"
Then
Cancel = True '??????
MsgBox "You can only have one invoice per bob entry", vbInformation,
"Data Error"
End If
'From here I want to go back to the form as if I only have
one entry now and sitting as if I just called it up.
End Sub
Thank You
Charlie