DLOOKUP error 2471 (1 Viewer)

John Big Booty

AWF VIP
Local time
Today, 18:18
Joined
Aug 29, 2005
Messages
8,263
I am facing a problem
2 tables LU Product and Sales Point
I want the price from LU product populates when I enter the product in Sales point form
The code I have written is as below
Private Sub Price_AfterUpdate() Product = DLookup("Product", "LU Product", "Price=" & Price) End Sub It works when I enter the price and the product names populates BUT

gives error when applied gives error 2471
Private Sub combo10_AfterUpdate()
Price = DLookup("Price", "LU Product", "Product=" & Combo10)
End Sub

The combo10 is Product field in Form

Dude, please don't double post, spamming the forum will not get you an answer any quicker :mad:
 

cns_66

New member
Local time
Today, 13:48
Joined
Jul 23, 2020
Messages
1
I think your dlookup should look something like:

DLookup("[Password[", "Staff", "[LoginID]='" & Me.txtUser & "'")

???
thanks it worked. Microsoft websites itself giving wrong syntax
 

Isaac

Lifelong Learner
Local time
Today, 01:18
Joined
Mar 14, 2017
Messages
8,778
thanks it worked. Microsoft websites itself giving wrong syntax
I like to think of the dlookup criteria portion as following the same syntax as a Where clause. Delimiters required, if you would use them in a Where clause.
 

Users who are viewing this thread

Top Bottom