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.
 
I have the default value set as =Date() and this problem
still exists.

Cheers
 
After looking through the many posts here, I found one
with the answer. Me.Undo followed by DoCmd.Close

Cheers
 

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