Is the Unit Price field in your table called UnitPrice ?
Is the product ID text or numeric ?
The DLookUp function basically says, get me the Unit Price field from the
products table from the row where the productID matches the one I have
selected in the combo box.
Is your combo box bound on the ID or the description of the product ?
You need to check all these things and then provide the relevant info in the
DlookUp statement.
Evil_jay said:
That didn't work My products are in a table Called Products also the Unit
Price is there for the product the combo box on my form is called ProductID.
I tryed what you wrote and it gave me #name? in the field for unit price....
:
Assuming your product information is in a table called Products and your
combo box is called cmbProduct set the control source property of your Unit
Price field to
=DLookUp("[UnitPrice]","Products","[ProductID] = '" & Me.cmbProduct & "'")
:
I'm not sure if we are on the same page(sry I may have explained it wrong) in
my product Id field (combo box) list all my products when i select a product
i want the amount of that product to auto post to my Unit Price field. The
expression i have already" Price=[UnitPrice]*[Quantity]" will already
Calculate my total once i input the Quantity needed. I just need to find out
how to make it work.... if you could tell me how to write the expression it
would help me out alot.
Thanks
:
The best way would be to make the product selectable from a combo box and put
all the other fields that you need as columns in the combo box. You can then
set the control source of the text fields on the form to
=ComboBoxName.Column(1)
=ComboBoxName.Column(2)
etc.
:
I have 4 Fields On a form Product Id(Shows a description of my product
instead of it's Id Number),Quantity,UnitPrice,Price. I need to find out how
to make all of this work together
When I select a Product id, i want it to auto find the UnitPrice so that all
i have to do is type in a #value in the Quantiy Field And have it calculate
my total price.
Can anyone help me i thin ki need a iF then Statement But not sure How to
set it up on access 2003