Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
DLookup hates me
Asteropi Papadopoulou 
   
2 years ago
I'm doing the customer-specific pricing video and I follow everything you say step-by-step but I am currently stuck at the DLookup command.
It seems DLookup won't recognise a comma between the field and the table strings. I have double and triple checked everything I typed. I even went to another video to see. I even copied the command directly from this website and replaced my tables, but still that comma error will not go away.

If I erase the DLookup command the database works fine, so it's not corrupt. I also checked that I'm typing in English. I'm at my wits' end here. Any advice?
Richard Rost  @Reply  
          
2 years ago
I know the formatting is different in non-English versions of Access. You might have different delimiters. I'm guessing you're Greek? (I'm actually visiting Santorini in October).

Without seeing what you've got there, I really can't  help you any further.
Asteropi Papadopoulou OP  @Reply  
   
2 years ago

Asteropi Papadopoulou OP  @Reply  
   
2 years ago

Alex Hedley  @Reply  
           
2 years ago
Might need a space after your AND
& "AND"
& " AND"
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
Indeed I am greek, and Santorini is great! Been there 3 times. You do need a car or a bike to get everywhere around the island.

Anyway I am using an english version of access and all my settings are also in english. The only thing in greek is the names I use for tables/queries and so on. Could you please have a look?

I uploaded a picture of the code I use for now because when I tried to write it here it turned to gibberish.
I also uploaded 2 of the errors I get and I could also send over my database if it can help
Asteropi Papadopoulou OP  @Reply  
   
2 years ago

Asteropi Papadopoulou OP  @Reply  
   
2 years ago
I tried the space after the AND, still getting the same error. And then it takes me to that highlighted comma I have in the first picture
Alex Hedley  @Reply  
           
2 years ago
Could you try ;
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
ah that did the trick
now it hates the last productID value
Alex Hedley  @Reply  
           
2 years ago
Alex Hedley  @Reply  
           
2 years ago
Although ProductID is likely a number could it be a string?
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
It's definitely a number
Alex Hedley  @Reply  
           
2 years ago
You'd tend to use a DLOOKUP on a Form.
If you're using it in a QUERY you might as well just join the other Table in your Query and pull the column in there instead, it'll be more performant, especially if there are lots of records.
Alex Hedley  @Reply  
           
2 years ago
For that error you need to make an ALIAS on the Table and reference the field like
Product p WHERE p.ProductId =
Or you can say TABLE.FIELD instead of just FIELD
It can't work out which Table you are asking it from as they both contain it.
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
Yeah I just deleted that table. I had opened it just to see the names and forgot to close it.
Now however, when I try to run the command it asks to manually give it a CustomerID to find
Asteropi Papadopoulou OP  @Reply  
   
2 years ago

Asteropi Papadopoulou OP  @Reply  
   
2 years ago
It didn't do that in the video I saw
I also tried what you said about the query and while it shows the prices it doesn't perform exactly the same way as in the video
Alex Hedley  @Reply  
           
2 years ago
If you reference a field from a form in a Query you need that Form open
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
It was open but it wouldn't reference it. I have no idea what I did, but I wrote it from the beginning and now it's fine. So time comsuming! This silly little thing took me hours :(
In any case, Thank you so much for all your help
John Davy  @Reply  
         
2 years ago
Hi
Dlookup doesn't hate you with a fine name like Papadopoulou.

I lived with a Greek family in Cyprus for 2 years

Enjoy
John
Kevin Yip  @Reply  
     
2 years ago
Whether you use comma or semicolon as the separator is determined by Windows.  Go to Windows regional settings to see what it is (picture below).
Kevin Yip  @Reply  
     
2 years ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/2/2026 8:53:00 AM. PLT: 1s