Table/Form relationships in Access.

G

Guest

If I make a table of inventory, and then create a form as a packing slip, how
do I design it properly so that the amount on the packing slip automatically
reduces the quantity of what is being shipped from what is in the table?
 
G

Guest

Piano Man,

I am a little confused on what table(s) we are talking about. Does your
Packing List form have it's own table or are we talking about the Packing
List form using the Inventory table?

It may make a little difference in how you struture this, but essentially,
the idea is to put the code you need in the After Update event of the text
box where you put the Ship Qty.

If it is on the same form, it would be like:

Me.OnHandQty = Me.OnHandQty - Me.ShipQty

If it is in a table other than the one your form is bound to, then you will
have to add code to open the Inventory table, find the record you want to
update, and update the on hand quantity.
 
G

Guest

It is a table that the form is bound to.

Klatuu said:
Piano Man,

I am a little confused on what table(s) we are talking about. Does your
Packing List form have it's own table or are we talking about the Packing
List form using the Inventory table?

It may make a little difference in how you struture this, but essentially,
the idea is to put the code you need in the After Update event of the text
box where you put the Ship Qty.

If it is on the same form, it would be like:

Me.OnHandQty = Me.OnHandQty - Me.ShipQty

If it is in a table other than the one your form is bound to, then you will
have to add code to open the Inventory table, find the record you want to
update, and update the on hand quantity.
 
M

Marshall Barton

Be careful here. If a user enters a ShipQty, then realizes
it's the wrong value and re-enters the correct value, both
value will be deducted from OnHandQty.

I don't like the idea of keeping an inventory value on the
fly like this, but this might be a little more robust:

Me.OnHandQty = Me.OnHandQty + _
Nz(Me.ShipQty.OldValue, 0) - Me.ShipQty
 
W

wasim_sono

I have a similar problem
I have two tables. 1-Budget and 2-Tran
I want to make a form that had an input boxfor the expenses of
transaction and a textbox which displays this value based on thi
value another textbox hold the accumulated values for a specifi
month

Budget allocated
Total Expenditure Over al
Monthly Av
Expenditure incurred for mont
Balance for Mont
What should i do??
Thanx in advanc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top