B
Bonnie
Using A02. I am on the road to learning and loving every
minute of this! I can now write IF's so I can validate
data on a form's BeforeUpdate event procedure. How can I
check for a number of things and then (and only then) save
the record. My IF's have CancelEvent if any rule is
broken. I'd rather not put Else: DoCmd.RunC...SaveRecord
in every IF because it will save if only 1 of 3 rules were
not broken. How can I check for more than one IF and then
only when ALL rules check out, save the record? I now have:
If Me.WireAmt > 0 And IsNull(Me.WireAcct) Then
MsgBox "Blah Blah Blah"
DoCmd.CancelEvent
End If
If Me.Journal = "-1" And Not IsNull(Me.Payee) Then
MsgBox "Blah Blah Blah"
DoCmd.CancelEvent
End If
If Me.CkReq = "-1" And IsNull(Me.Payee) Then
MsgBox "Blah Blah Blah"
DoCmd.CancelEvent
End If
Me.LastChgd = Now()
Me.LastUser = CurrentUser()
DoCmd.RunCommand acCmdSaveRecord
I was hoping if it got stuck before the bottom, it would
cancel and not save the record. However, I get Runtime
Error 2001 saying I cancelled the previous operation.
This website has been responsible for the great leaps in
my ability to work in Access over the last 3-4 years.
Thanks in advance for any help or advice. I LOVE YOU
GUYS!!! Thanks also for taking the time to help others.
minute of this! I can now write IF's so I can validate
data on a form's BeforeUpdate event procedure. How can I
check for a number of things and then (and only then) save
the record. My IF's have CancelEvent if any rule is
broken. I'd rather not put Else: DoCmd.RunC...SaveRecord
in every IF because it will save if only 1 of 3 rules were
not broken. How can I check for more than one IF and then
only when ALL rules check out, save the record? I now have:
If Me.WireAmt > 0 And IsNull(Me.WireAcct) Then
MsgBox "Blah Blah Blah"
DoCmd.CancelEvent
End If
If Me.Journal = "-1" And Not IsNull(Me.Payee) Then
MsgBox "Blah Blah Blah"
DoCmd.CancelEvent
End If
If Me.CkReq = "-1" And IsNull(Me.Payee) Then
MsgBox "Blah Blah Blah"
DoCmd.CancelEvent
End If
Me.LastChgd = Now()
Me.LastUser = CurrentUser()
DoCmd.RunCommand acCmdSaveRecord
I was hoping if it got stuck before the bottom, it would
cancel and not save the record. However, I get Runtime
Error 2001 saying I cancelled the previous operation.
This website has been responsible for the great leaps in
my ability to work in Access over the last 3-4 years.
Thanks in advance for any help or advice. I LOVE YOU
GUYS!!! Thanks also for taking the time to help others.