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!

Changing Values in a Form

Status
Not open for further replies.

davidchipman

Programmer
Jun 27, 2002
19
CA
Hi
Hope someone can help me with this one. I have a form created that allows printing of clients that are selected.
i.e. Client A is selected and all necessary mailing information is printed on the report (envelop) that has been created.

Problem...If I want to change the contact person in this envelop (but not save it as they will never be used again) and print this person with the contact information in the database...how can i do this...

So what I am trying to do is change data in the database without saving the changes but being able to print the changes. I hope this makes a little sense and any help I get is greatly appreciated. Thanks in advance.
Dave
 
On your report, you would have to have a field that refers to the field on your form that has the contact.
 
Use an unbound textbox and force the user to put something in that box and make that box a part of the report.

rollie@bwsys.net
 
On your form create an unbound text field.
When you run the form, enter in the field what you want the contact person to be.
If you want it to be the same as what is stored in the database, create a button that if clicked sets the value of the unbound text box to what is stored in the table.
Then, on the report instead of using the field from the table as the contact name, use the current value of the unbound text box on your form. Its control source would look a little like this:

=[Forms]![NameofForm]![NameofUnboundTextBox].value

Note, make sure to leave the form open, or when the report ries to look at the value on that form it throw an error message. Also, this example is if you only change the contact person's name.

hope this helps you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top