Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > Forums > Access Forum > Default Values by Dwayne Ham
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Default Values
Dwayne Ham 
    
4 years ago
I would like to create a "Default Values" table and then point a field from my main table to it for values for a new record. Your default value video mentions putting a box(es) in a form for default values.  Can I do it from a table that I update when the default value changes?
Richard Rost  @Reply  
          
4 years ago
Sure. Just use DLookup in an event... maybe BeforeInsert.
Dwayne Ham OP  @Reply  
    
4 years ago
for example: table is "Tbl-DefaultValues" and I put "=[Tbl-Default].[City]" in my main table in the field properties default values.  I think my syntax is wrong because this gives me an error.
Richard Rost  @Reply  
          
4 years ago
Yeah, that's not going to work. You can use DLookup in the Default Value if you want. Someone else actually asked me a very similar question not too long ago... it's on my list to make a video out of. Stay tuned. I'll bump it up the list.
Dwayne Ham OP  @Reply  
    
4 years ago
I tried this but it didn't like it.
=DLookUp("City","Tbl-Default","ID=1")
Should I use a double quote somewhere?
Richard Rost  @Reply  
          
4 years ago
No... that should work. You probably need brackets around your table name because you didn't follow the rules from Access Beginner 1. Characters and Numbers ONLY in your table and field names.

=DLookUp("City","[Tbl-Default]","ID=1")
Dwayne Ham OP  @Reply  
    
4 years ago
I got this.
Unknown function 'DLookUp' in validation expression or default value on 'Tbl-Home.City'.
Richard Rost  @Reply  
          
4 years ago
Dwayne Ham OP  @Reply  
    
4 years ago

Richard Rost  @Reply  
          
4 years ago
This won't work in the default value of a table, only a form.
Dwayne Ham OP  @Reply  
    
4 years ago
OK  thx

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/5/2026 10:04:49 AM. PLT: 0s