Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to DLookup Tricks    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
You Just Saved Me
Maurice Loucel 
     
10 months ago
Sometimes I forget stuff, I've done a few times now Dlookup but I had an issue with one in particular, I spent almost 3 hours trying to figure out what was wrong, I couldn't.
So I finally decided to come and look for your master examples and believe me or not I didn't even need to see the video, as soon as I saw your video screenshot I knew immediately what was wrong, I did the change and VOILA..
I decided to write this note, so you know how powerful is your teachings that a simple screenshot was enough.
Here is my line of code with the error, I'm sure you'll see it immediately:

SAPw = DLookup("[UserPassw]", "UserT1", UserID = 1)

SAPw stands for Super Admin Password LOL..
Kevin Robertson  @Reply  
          
10 months ago
Yep. Missing quotes around the criteria.
Also, you don't need the brackets around the field name since there are no spaces.
Richard Rost  @Reply  
            
10 months ago
Yeah, and do you know exactly what it's doing there? It's sending a true or false value to Dlookup whether or not user ID is equal to one. Was it giving you a type mismatch error? Because I'm pretty sure Dlookup is looking for a string there, but it might accept a variant, which is why it will compile but it won't work. Runtime errors are always usually the weirdest ones.
Richard Rost  @Reply  
            
10 months ago
Yeah, I just tried it and got a "tight mismatch" error. If you look at the IntelliSense pop-up for the criteria, it doesn't tell you what it's looking for. The other two specifically say string.
Richard Rost  @Reply  
            
10 months ago

Maurice Loucel OP  @Reply  
     
9 months ago
Richard
Sorry for the late response.

On your first reply you said is returning a true/false value, but is not once fixed, is returning the value of the password for the admin [me] found in the table, which by default is always in position 1.

I move the value  the Super Admin [me] then to SAPw, and I use it around my form to see if the user can or cannot access a field.

I am deeply sorry but I have no idea what "IntelliSense" is but I am sure you have a video about it..😂

I did change the last part to 1=1 nevertheless, and it works as well, thanks.

Thanks for your help.
Richard Rost  @Reply  
            
9 months ago
IntelliSense is just that little pop-up thing that tells you what's going on.

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

Next Unseen

 
 
What's This?

 

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: 11/8/2026 1:53:43 PM. PLT: 1s