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

updating data in subform

Status
Not open for further replies.

bigfigkid

Programmer
Feb 18, 2003
26
0
0
CA
Hi all !

I have on order/invoice dbase in access.

Our invoice form has a subform, which contains the quantity ordered and quantity shipped fields. Most of the time there are no changes, and the quatity ordered = quantity shipped.

I would like to place a command button on my invoice form, which when clicked fills in order 100%.

How can I update each quantity shipped field to equal it's corresponding quantity ordered field in the invoice selected ?
 
I would rather have unfilled orders show up as 0's for quantity shipped until point of shipping.

I have been able to have the quantity shipped=quantity ordered when quantity shipped is double clicked. But I have to double click each item in the invoice that needs to be filled. I want to click one button on invoice form to fill in all quantity shipped fields in invoice detail subform .
 
You could create an update query that would update all the values in the subform's data source for that particular invoice number.
Then put the following code in the buttons onclick event:

docmd.setwarnings false
docmd.openquery "YourUpdateQueryName"
me.YourSubformName.requery
docmd.setwarnings true

Please make a backup of your data before testing this!

HTH,
Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top