Pulling entire record in a form

G

Guest

I am hopefully missing something simple. I am trying to edit the
orders management database template that is on Microsoft online. File
01018548.

The form titled add an order details includes a subform that is called
order details.

Well, using the first form, "add an order details" one should be able
to select their product from the dropdown menu in the subform and the
price of that product should autofill along with the subtotal.

Well, the template wasn't created with that part working. I thought it
was a relationship issue or maybe a query that needs to be called in
the "price" field.

So it comes down to I have a subform that I want to use to bring up a
specific record as it relates to the record chosen in the "product"
drop down field. I want price to autofill on the form.

I think I can figure the rest out from there if someone can just help
me with this.

Ben
 
T

tina

try adding the following procedures to the subform, as

Private Sub ProductID_AfterUpdate()

Me!UnitPrice = Me!ProductID.Column(2)
Me!Price = Nz(Me!UnitPrice, 0) * Nz(Quantity, 0)

End Sub

Private Sub Quantity_AfterUpdate()

Me!Price = Nz(Me!UnitPrice, 0) * Nz(Quantity, 0)

End Sub

hth
 
Top