Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > DLookup < Markup | Quote, Invoice, Receipt >
Back to DLookup    Comments List
Upload Images   Link   Email  
Dlookup Error
Chris Pardy 
    
3 years ago
I have a text field on a continuous form where I am trying to lookup a name field (Department) from tblDepartments where the DepartmentID =  the foreign key in the current table aslso called DepartmentID.

=Dlookup("Department","tblDepartments","DepartmentID=" & DepartmentID)

The result is errors and like the db is stuck in a loop with the fields flashing... where am I going wrong ?
Alex Hedley 
             
3 years ago
Why not use a Query instead.
DLOOKUPs should really only be used in a single item.
Chris Pardy OP 
    
3 years ago
Hi Alex. do u mean only on a single form ? in this case I'm trying to using it in a text box on a continuous form.
how would I use a query as the data source for a text box ?
Kevin Robertson 
           
3 years ago
Add the required tables to the query.
Bring in the fields needed for your form (including, in your case, Department).
Set the Record Source of the form to the query you just built.
Chris Pardy OP 
    
3 years ago
Hi Kevin.. my form was based on a table because I also need some cascading combo boxes in order to select a value.. but It seems basing a form on a query instread of a table breaks that funtionality ?
Kevin Robertson 
           
3 years ago
OK. Check your spelling. Make sure the field names are spelled exactly the same way as in the table.
Alex Hedley 
             
3 years ago

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

 
 
 

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 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/27/2025 7:12:10 PM. PLT: 2s