By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,401 Members | 928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,401 IT Pros & Developers. It's quick & easy.

Help with Dlookup syntax

P: 8
I have a form based on tbl_Wedding_Products which contains a combo box cboPID which looks up product details in tbl_Products. I am trying to display the cost of the product (in text box txtUBP), held in tbl_Products, for the product selected in cboPID but it doesn't work. Can you sort my syntax out please?

txtUBP = DLookup("[Product Buying Cost]", "tbl_Products", " [tbl_Products]![Product ID] ='" & [cboPID] & "'")
Sep 4 '07 #1
Share this Question
Share on Google+
5 Replies


lee123
100+
P: 556
why dont you try this:

txtubp=dlookup("txtubp","tblproducts"."productid=" & cbopid")

i think this will work!

lee123
Sep 4 '07 #2

lee123
100+
P: 556
oops i goofed i put quotes in a place it not suppose to be

try this:

Expand|Select|Wrap|Line Numbers
  1. txtubp=dlookup("txtubp","tblproducts"."productid=" & cbopid)
sorry this will work .

lee123
Sep 4 '07 #3

lee123
100+
P: 556
i can't type this morning there is no period in this sorry(use a comma after tblproduct)

lee123
Sep 4 '07 #4

P: 8
Hurrah - thank you - you've stopped me going mad!
Sep 4 '07 #5

lee123
100+
P: 556
Glad i Could help.

lee123
Sep 4 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.