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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use oldvalue

Status
Not open for further replies.

sdg

IS-IT--Management
May 31, 2000
2
US
We are using a sales quote database that was written in Access.  When creating a new quote for an existing customer, a drop-down list is used to select the customer and having the address information filled in on the form.  Once in a while, the customer address needs to be changed only for the new quote.  How can I use oldvalue to make the new address change, print the new quote then preserve the old address information in the customer table?
 
Strikes me that since you will come back to the calling procedure once you have gone to print your Report, that you could just store the value of oldValue in a Variable. Once you come back to the Form, you could insert the oldvalue back into the field, or use a runSql command to insert in directly into the table. You will have to commit the record before you print the Report, so a simple undo will not work. If these don't work you may need a public variable in a class module and a procedure in that module that calls the print and then replaces the oldValue.<br>cmcbride
 
This can also be done through a diff. approach- pop up a form which has fields mirroring the address from the parent form but not linked to the master table and allow the user to change the address in this form. Print the report by taking the data from this pop-up form and do not update the table with the new address.<br><br>I hope it makes some sense.<br><br>Vandys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top