Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
HELP DLookup ComboBox
John Yeung 
     
4 years ago
I have two tables

1. tbl_DefaultDrugList contains drugnameID (field) and DdrugfreqID (field)
2. tbl_Prescription contains drugnameID (same as above) and PdrugfreqID (field)

I made a form frm_prescription based on tbl_Prescription, drugnameID used combobox from another table tbl_drugname , and PdrugfreqID used combobox from tbl_drugfreq

I want to select a drug from drugnameID (combobox), the PdrugfreqID (combobox) will find a value from the DdrugfreqID automatically. Therefore I type in default value of PdrugfreqID as =DLookUp("[DdrugfreqID]","[tbl_DefaultDrugList]","drugnameID=" & [DrugNameID])

Unfortunately, it is not working

pls help
Scott Axton  @Reply  
      
4 years ago
John with out seeing what you have done it pretty much impossible to help you diagnose what to do.

Are you getting any error messages?  "It is not working" doesn't tell us anything either.

Please post some screen captures of your form i design mode to help us see what we can do to help you.
John Yeung OP  @Reply  
     
4 years ago

John Yeung OP  @Reply  
     
4 years ago

John Yeung OP  @Reply  
     
4 years ago

John Yeung OP  @Reply  
     
4 years ago
thanks
Kevin Robertson  @Reply  
          
4 years ago
John Yeung OP  @Reply  
     
4 years ago
When I select a drug from the field "drugnameID" (combobox) of a form "frm_prescription", I want the PdrugfreqID (combobox) will find a value from the DdrugfreqID automatically. Therefore I type in default value of PdrugfreqID as =DLookUp("[DdrugfreqID]","[tbl_DefaultDrugList]","drugnameID=" & [DrugNameID]). But nothing happened when I select a drug from drugnameID.  I already did put in me.refresh or me.requiry in the "after update" of drugnameID. Same .... not working
Kevin Robertson  @Reply  
          
4 years ago
You can't use Default Value for this. It will only get the default for new records.
You need to put your Dlookup in the After Update event of the Combo Box you are making the selection in.

FieldOnForm = DLookup("Field", "Domain", "Criteria")
John Yeung OP  @Reply  
     
4 years ago
done , it is working , thanks

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

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: 9/12/2026 4:25:54 PM. PLT: 1s