Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Temp Record and only save when committed

Status
Not open for further replies.

daneharnett

Programmer
May 26, 2003
39
AU
Hi,
I have a FE/BE setup and would like the ability for my users to open a form, enter details, have these details saved into table(s). and at the end they must click 'OK' or 'Cancel'. this will moved the data into the 'actual' tables... if the user selected cancel then the data would be deleted from the temp record...

Also if possible id like to have a 'wait' option so that the data is held but not committed to the production tables yet...

Can anyone help?
Is this possible?
 
daneharnett

Is there a reason you need to use the temp record instead of using some of the tools in Access?

First, there is the DoCmd.CancelEvent and DoCmd.Restore methods.

Second, Access stores the old value of each field under the property - ctl.oldvalue. You can manipulate this value in your code, i.e. store the value for recovery if required.

Third, the ctl.dirty property. See Access Help. Again, you can use this property to display your cancel button or other such action.

Instead of going through the logic of creating and deleting temp records, you may be able to use these Access tools instead.

I know this is not the specific answer you are looking for, but if you have not considered these options then maybe I saved you from a bit of coding.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top