Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Expert 2    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
data input form with combo box
MIchael King 
    
3 years ago
I have posted twice to the forum but have not received any responses.
I have a form which has some fields that are entered from the operator, and one combo box that collects the possible entries from another table. It is a data input table. It has a button to add record to store the data and revert to a blank form. The problem is that I want some of that data to remain in some of the fields so that the operator doesnt have to re-enter it after each record is entered. I have managed to get this done on the fields except for the combo box.
In the After Update field for the non-combo box I write the following:
Me.ControlName.defaultvalue =  & me.ControlName.value &
This works for the normal fields, but not for the combo box.

Please help. If there is a lesson which contains this trick, please let me know and I will purchase that lesson.
Mike King
Kevin Robertson  @Reply  
          
3 years ago
What is the actual code you have for non combo box fields. The code you have stated above gives an error.
Please post a screenshot clearly showing the EXACT code.
Kevin Yip  @Reply  
     
3 years ago
If you need to re-enter the same data into another record, there may be something wrong with the table design, because tables need "normalization," which means each piece of data only appears once in a table.  In a normalized design, you rarely need to enter the same data in different rows.
MIchael King OP  @Reply  
    
3 years ago

MIchael King OP  @Reply  
    
3 years ago

MIchael King OP  @Reply  
    
3 years ago

MIchael King OP  @Reply  
    
3 years ago

MIchael King OP  @Reply  
    
3 years ago
OK, here is a simple database that demonstrates the problem. There are two simple tables as shown in images 1 and 2. There is a simple form shown in image 4. If I want the ScanDate to remain on the form after I press Add Record, I go to the After Update property for the sheet, enter the code builder, and enter the code shown in image 3. This works.
However, if I want the TechName to remain, when I try to enter similar code, the code builder will not let me use the DefaultValue word in the code. I type in Me.TechName. but the only option there is value.
I hope this is clear enough. In my previous attempts to get an answer I also showed these screenshots, although with a more complicated database. This time I just wanted anyone who has been successful using a combo box and making the value remain after adding the record to tell me how they did it.
Thanks for helping.
Mike
Kevin Robertson  @Reply  
          
3 years ago
Use the name of the Combo Box not the Field Name.
Richard Rost  @Reply  
          
3 years ago
Entering data and then moving to a new record in that same table, then you'll need a way to copy the value from the previous record. Changing the default value like that isn't a good way to go about it. What you might want to consider doing is putting that Tech name field as a default value up in the form header like I cover in the Extended Cut for this video: Default Value.

Or you could use an unbound form and then add the data with an SQL insert statement when the user clicks the button but that's a little more involved.

I'd also like to remind you that even though you posted already in the Forum and no one's posted a reply, just sit back and be patient please because the moderators that help here are all volunteers and even though I do read all of the posts myself eventually I'm currently about 6 months behind due to the volume posts we receive. Tech support is not guaranteed and if you want paid support there is the Access Developer Network forum.

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

Next Unseen

 
New Feature: Comment Live View
 
 

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: 6/13/2026 5:35:54 PM. PLT: 1s