Writing Data From Form To Table

C

cbremar

I am creating a database for the purposes of ordering. I
have a main form that holds the bill to/ship to and a
subform for the items to be ordered. The problem I'm
running into is that the subform does not write the unit
price to the 'details' table. Any suggestions?
 
G

Guest

-----Original Message-----
I am creating a database for the purposes of ordering. I
have a main form that holds the bill to/ship to and a
subform for the items to be ordered. The problem I'm
running into is that the subform does not write the unit
price to the 'details' table. Any suggestions?
.

cbremar,

It could be that your relationship between the tables
aren't correct or you did not create any relationship
between them. On the main screen of your database, right
click and select relationships.

mike
 
R

Ravindra N. Shantagiri

You have to pick the price from the item_master. In the
subform when you select an item from the master, the unit
price associated to it has to be filled automatically in
the unit price text box of the subform. This can be done
by writing the following code in the after update event of
the item text box.

me!unit_price = Dlookup
("Unit_Price","Item_Master","Item_code = " & Me!Item_code)

This way you will get the unit price in the bound text box
which will update the details table.

Ravi
(e-mail address removed)
 

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