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 Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Help my combobox goes blank
jay 

16 years ago
Hello I have a question, or I should say problem.

I have three comboboxes on a subform; the subform is a continious form. And they are cascading comboboxes. When the user enters an option in combobox 1 combobox 2 shows the available(corresponding) options, and when the user chooses an option in combobox 2, combobox 3 shows the corresponding options. (so the goal is just to narrow down the options, to prevent the user to enter faulty infomation) Combobox 1 has an AFTER UPDATE event, and the event just refreshes combobox 2, so that it can show the corresponding options right away. And combobox 3 has an ON GOT FOCUS event. and that event refreshes the combobox when it gets the focus, so that the user can get the correct corresponding options.

The problem is, after selecting (and entering) an option in combobox 3, when the combobox loses focus, it goes blank. As long as the cursor is at the combobox, I can see the option I selected, but when I "move away" my selection is not visible anymore. Could you please help me with that?

The row source of combobox 3 is as follows:

SELECT dbo_Schjr_Niv_Prof.Schjr_Niv_Prof_ID, dbo_Schjr_Niv_Prof.Prof_ID, dbo_Schjr_Niv_Prof.Prof_Keuzevak_ID, dbo_Profiel_Keuzevakken.Keuzevak_ID, dbo_Schjr_Niv_Prof.Niveau_ID, dbo_Schjr_Niv_Prof.Schooljr_ID, dbo_Klassen.Klas_ID
FROM dbo_Klassen INNER JOIN (dbo_Schjr_Niv_Prof LEFT JOIN dbo_Profiel_Keuzevakken ON dbo_Schjr_Niv_Prof.Prof_Keuzevak_ID = dbo_Profiel_Keuzevakken.Prof_Keuzevak_ID) ON dbo_Klassen.Niveau_ID = dbo_Schjr_Niv_Prof.Niveau_ID
WHERE (((dbo_Schjr_Niv_Prof.Schooljr_ID)=[Forms]![Frm-Studenten]![Frm-Student_Details_Nobo].[Form]![Schooljaar_ID]) AND ((dbo_Klassen.Klas_ID)=[Forms]![Frm-Studenten]![Frm-Student_Details_Nobo].[Form]![Klas_ID]))

Additional information:
Mainform name = Frm-Studenten
Subform name = Frm-Student_Details_Nobo
Combobox 1 name = Schooljaar_ID
Combobox 2 name = Klas_ID
Combobox 1 name  = Schjr_Niv_Prof

Hope to hear from you soon.

 


Answer from Richard Rost:

Why are you using an On Got Focus event? Just put an AfterUpdate event in Combo2 and refresh Combo3, just like you said you're doing for Combo1 and 2.

See this tutorial for how I use cascading combo boxes:

I get asked this question all the time. You've got two or more combo boxes and you want the first one to filter the second one. I get asked this so much that I recorded a video tutorial explaining how to do it:

http://599cd.com/tips/access/two-combo-boxes?key=BlFAlEx

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

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: 5/31/2026 7:27:45 PM. PLT: 1s