Writing Data From Form To Table

  • Thread starter Thread starter cbremar
  • Start date Start date
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?
 
-----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
 
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)
 
Back
Top