DLOOKUP error 2471

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:
 
I think your dlookup should look something like:

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

???
thanks it worked. Microsoft websites itself giving wrong syntax
 
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

Back
Top Bottom