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

Adding info. about individual records, with mult. records showing?

Status
Not open for further replies.

marle35

Programmer
Jul 17, 2007
36
0
0
I am working with an inventory system, and would like to have a form that shows all products and their current inventory levels, and next to each of them have a textbox for entering in new inventory levels. After the user enters in all their new inventory levels, there would need to be calculations done with the new values. Is this possible somehow? I can't seem to so it with continuous forms. Is it possible to have run-time created textboxes? Any help would be greatly appreciated.
 
I don't see a need for dynamically created text-boxes. Just have an unbound textbox on the form.

 
The number of products is not known until run-time, and when I include an unbound textbox on the form, when the user enters in a value, that value appears in ALL the other unbound textboxes in a continuous form. That is not what I want. I want each textbox to be able to contain unique values.
 
I would add a field to my table whose purpose is to temporarily hold a value on this form. Then you can bind this field to a textbox. After you run your calculations you can use a update query to clear all of the values. This technique is easy to implement and will serve your purpose. Purists may find this a little clumsy because your table is somewhat non-normalized because your table contains a field for the sole purpose of holding a temporary value on form. I use a similar technique if I want a continous form with checkboxes to select a record. In this case when I close the form I write the IDs to a table of the records selected. When I reopen the form I re-check the selections based on the IDs in the table.

If you were going to build dynamic controls, you would have to unbind the whole form. This would be really complicated, and far more clumsy then a single temp field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top