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!

Keep textbox value static when entering new record 1

Status
Not open for further replies.

munger

Programmer
Feb 28, 2001
23
IL
We get a written report with the "ProductName" and the "DateSold" on the top of the page and then the list of customers and quantities they purchased. (They refuse to send table as a file. So we must enter the data by hand. )

When entering the data, I don't need to change the "ProductName" or "DateSold" each time so I want to put a combobox or textbox for each of them in the header of the form that will keep the current "ProductName" and "DateSold" constant until there is a reason to change them.

I tried to code this in the form_current but as the form loads I get error messages.

Alternatively, I could code the default value of the textboxes to be the previously entered value.

Any ideas?

Thank you.
 
One way is to create a query with ProductName,DateSold. Make this the One side of a one-to-many query. You can then create an automatic Form-SubForm with the Form-Subform Wizard. That allows you to move through products in the mainform and to enter individual records in the subform. Remember the sub-form can be either datasheet or form view, or both. If it only works with tables then create a temporary table via a Make-Table query.

The beauty of this is you don't have to do any programming or deal with any error messages.

In the UK we say "Don't have a dog and bark yourself"... mike.stephens@bnpparibas.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top