24 minutes ago: Please note that the webserver will soon get its weekly reboot at 4:00 am Eastern Time. You may continue to use the site as normal, but you will be logged off at that time. You should be able to log right back on immediately, however. If you are in the process of placing an order, please make sure to complete it as quickly as possible, or come back after the reboot. Thank you. Sorry for any inconvenience.  Dismiss
 
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 Developers    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Form Combo Box Population
Daniel Golden 
     
2 years ago
In a form on my database, I have two combo boxes. One titled "UserID" and the other is "Assigned Investigator" (sorry for the spacing Alex!) these two boxes are using the row source of a table called "UserT". The rest of the form uses a record source of "Unit/Center Reviews"... I am needing for the combo box titled "UserId" to auto populate with the corresponding UserID of the investigator that is selected in the "Assigned Investigator" combo box. What am I missing?
Kevin Robertson  @Reply  
          
2 years ago
Daniel Golden OP  @Reply  
     
2 years ago

Alex Hedley  @Reply  
           
2 years ago
Why do you need two if they are the same value?
Are they ever different?
Could just bind it to UserID.
Alex Hedley  @Reply  
           
2 years ago
As an aside are there always 10 employees and 10 inmates?
You might want them as subforms so you can have any number.
Relationships
Daniel Golden OP  @Reply  
     
2 years ago
@ Alex The "UserID" is an autonumber assigned by Access on the UserT. essentially they are the same I suppose but my table is not updating with just the info being in the "Assigned Investigator" box.

Also, thanks for the side note, there are not always 10 of each, but they differ from time to time. I will give that video a look soon.

I am trying to get Kevin's suggestion of using the After Update event to get the form to do what I want, and I am almost there. I have it set up like so:

Private Sub Combo15_AfterUpdate()
  If Combo15 = "1" Then
      UserID = "1"
  End If
End Sub

This works for the first Investigator named in the UserT, but no others.... any advise?
Daniel Golden OP  @Reply  
     
2 years ago
Should also note... in the final version of the form displayed the "UserID" field is not visible.
Kevin Robertson  @Reply  
          
2 years ago
You are dealing with IDs (numbers), not strings,  so you don't need the quotes.

Private Sub Combo15_AfterUpdate()
  
  UserID = Combo15
  
End Sub


Be sure to give your Combo Boxes (and any other control referred to in code) descriptive names.

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

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: 8/30/2026 3:54:32 AM. PLT: 0s