DLookup function

  • Thread starter samotek via AccessMonster.com
  • Start date
S

samotek via AccessMonster.com

In my form I need to build a Dlookup function and I need a help.My task is
the following. In my table products I have the fields code,suppliercode and
grossprice.
In my form I have a blank field called Supplier Grossprice.I want to enter a
dlookup function in this field finding the grossprice against this code.
For example in the first row I have code = 16733 and grossprice 20.96
The second row contains a filled in field SupplierCode = 16733
With the Dlookup function I want the next field, called SupplierGrossprice to
show 20.96
How can I do it?
 
T

Tokyo Alex

Hi,

I believe
=Dlookup("[grossprice]","[products]","[suppliercode] = " & Me.SupplierCode)
should do it.

If suppliercode is a text field, you'll need to add quotes:
=Dlookup("[grossprice]","[products]","[suppliercode] = """ & Me.SupplierCode
& """")

Cheers and hope this helps,
Alex.
 
S

samotek via AccessMonster.com

Thank you very much ! It is excellent !

Tokyo said:
Hi,

I believe
=Dlookup("[grossprice]","[products]","[suppliercode] = " & Me.SupplierCode)
should do it.

If suppliercode is a text field, you'll need to add quotes:
=Dlookup("[grossprice]","[products]","[suppliercode] = """ & Me.SupplierCode
& """")

Cheers and hope this helps,
Alex.
In my form I need to build a Dlookup function and I need a help.My task is
the following. In my table products I have the fields code,suppliercode and
[quoted text clipped - 6 lines]
show 20.96
How can I do it?
 

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

Similar Threads


Top