Canel without updating database

  • Thread starter Thread starter Paul Byford
  • Start date Start date
P

Paul Byford

I have a form which when opened, inputs the current date
by default. I want to be able to cancel the input and
close the form with saving the record with the date only.

I have tried the DoCmd.CancelEvent followed by
DoCmd.Close, but the record is saved with only the date
field.

Ideas???


Thanks in advance.
 
Paul Byford said:
I have a form which when opened, inputs the current date
by default. I want to be able to cancel the input and
close the form with saving the record with the date only.

I have tried the DoCmd.CancelEvent followed by
DoCmd.Close, but the record is saved with only the date
field.

Instead of "setting" the value to the current date use a default value
property of Date(). That way a new record is not created unless the user
enters data in some other control.
 
After looking through the many posts here, I found one
with the answer. Me.Undo followed by DoCmd.Close

Cheers
 
Back
Top