MajP
You've got your good things, and you've got mine.
- Local time
- Today, 00:11
- Joined
- May 21, 2018
- Messages
- 9,493
Not trying to muddy the waters here you have the OP well in hand.
For the rest of you, if you are not familiar what @arnelgp is suggesting you should add it to your quiver. I do not understand why @Pat Hartman is so dismissive of this approach. Many advanced Access developers do not understand that you can do transactions in DAO, and that opens up a lot of possibilities. The code that @arnelgp provides is easy to use and can do things way beyond validating a single record. His demo shows canceling a continuous form update. You could go further and cancel multiple child records.
So I find the below statement wrong
Not suggesting the OP should use this since it is a more advanced concept. I do recommend others get familiar for something else in the tool box. I have used this in some cases with great success.
For the rest of you, if you are not familiar what @arnelgp is suggesting you should add it to your quiver. I do not understand why @Pat Hartman is so dismissive of this approach. Many advanced Access developers do not understand that you can do transactions in DAO, and that opens up a lot of possibilities. The code that @arnelgp provides is easy to use and can do things way beyond validating a single record. His demo shows canceling a continuous form update. You could go further and cancel multiple child records.
So I find the below statement wrong
Clearly @arnelgp has shown the before update is not the only way@arnel, The OP wants to prevent saving a record if it is incomplete. The only RELIABLE way to do that is to put the validation code in the form's BeforeUpdate event so the save can be cancelled if there is an error.
Close form without saving record?
Im very new so this could be a dumb question but here goes. I have a form which adds records to a database of donors. On the form i have a close form button with the code that follows - DoCmd.Close acForm, "Add Donor Form", acSaveNo whenever the close button is pressed it saves the record to...
www.access-programmers.co.uk
Not suggesting the OP should use this since it is a more advanced concept. I do recommend others get familiar for something else in the tool box. I have used this in some cases with great success.