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 |
DLOOKUP setting default value
Karl Hughes 
    
3 years ago
I have been trying to assign a default value to a numeric field in a table using the DLOOKUP function to get the value from another table.  I created a DefaultValuesT table which will always have only one record.  I keep getting an error saying syntax incorrect.   Im using Access 2019.  I noticed that the expression builder for that default value parameter does not include the DLOOKUP function.

Does the DLOOKUP function work for setting a default value in Access 2019.  If not how else can I accomplish this?
Kevin Robertson  @Reply  
          
3 years ago
Can you share your DLookup so we can see the syntax.
Karl Hughes OP  @Reply  
    
3 years ago

Karl Hughes OP  @Reply  
    
3 years ago
Thanks for your reply.  I just uploaded an image file.
Kevin Robertson  @Reply  
          
3 years ago
You can't use DLookup in the Table like that. Create a form and put the DLookup in the Default Value property of the form field.
Karl Hughes OP  @Reply  
    
3 years ago
Thank you I'll try that tonight.  I do my Access from my home office computer.
Karl Hughes OP  @Reply  
    
3 years ago
Thanks again.  Knowing what doesn't work is a good start.  I still have not been able to get my DefaultCategoryID number into the default value of that field, where it will work.  (a simple 1 to 99 number)

I'm building an Inventory database.  In our language each project is called a panel.  
Each panel has a list of items needed to build the panel.  I have a table with a list of all items that could be used .  (InventoryItemsT)  
Each record in this table has a field CategoryID  which is the key field in my CategoryT

I have a table (PanelItemsNeededT) where each record in this table has field for the ID of each possible Item as well as a field with ID of each Panel and another field with the ID of each Category of Items.  (Inventory Items are grouped into Categories so searching in combo boxes have only reasonable number of  possibilities.

A clerk will enter items for a new panel from a Form (never a table).  By having a default value for the CategoryID field (and PanelID field as well) makes data entry much easier and more secure.  
When a clerk enters new record it will automatically have the CategoryID and PanelID entered so the clerk only has to select the inventory item.

Each panel has many items with the same CategoryID number.  So this will make it much quicker  and insure no mistaken entries.

Can you point me in the right direct to be able to  enter the default values without the clerk getting into the tables?  
Or is there some other way to accomplish this??

Thank you so much for your time and efforts here.

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: 10/30/2026 4:24:41 AM. PLT: 1s