Do not update record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have this code in the before update event:

tadoc = Left(DocID, 6)
datemax = DMax("datef", "invoice", "DocID like """ & tadoc & "*""")
If DateF < datemax Then
MsgBox "BLa, bla, bla"
Do not update record
End If

My intention is to prevent new records to have a date before the last date.

Unfortunately I do not know to code the “do not update record†part.
I would be most grateful if someone tells me a way of doing this.
 
hi Raul,

Raul said:
I have this code in the before update event:
My intention is to prevent new records to have a date before the last date.
Unfortunately I do not know to code the “do not update record†part.
I would be most grateful if someone tells me a way of doing this.
Use the Cancel parameter, set it to True.


mfG
--> stefan <--
 
Try Me.Undo

Raul said:
I have this code in the before update event:

tadoc = Left(DocID, 6)
datemax = DMax("datef", "invoice", "DocID like """ & tadoc & "*""")
If DateF < datemax Then
MsgBox "BLa, bla, bla"
Do not update record
End If

My intention is to prevent new records to have a date before the last date.

Unfortunately I do not know to code the “do not update record†part.
I would be most grateful if someone tells me a way of doing this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top