Solved

Are cascading combo boxes on a continuous form possible ?

Posted on 2015-01-03
4
236 Views
Last Modified: 2015-01-05
Hello,

This would seem to be a very simple problem, but I have spent hours on it with no success:

I have a continuous form (as a subform), with entered data populating a table. The continuous form has two combo box fields, “Company” and “Employee”, and I am filtering the query underlying the “Employee” combo box with the value of the “Company” Box. This part is working fine (when I click on the “Employee” combo box, I get the correct list of employees associated with the selected company, and the selected employees are being correctly entered into the table)

I also have some associated VBA code as indicated below.

The problem is that despite the underlying table data being  correct, employee names erratically appear or disappear from the continuous form Employee combo box field. For example if I click on the “Employee” combo box in a particular record, the employee names disappear from the other records, or if I close the form and re-open it, only a few of the records display the underlying Employee. For some reason when I remove the company filter from the “Employee” combo box, Employees in all records display stably. Of course this means that employees from all companies are now listed in the combo box selection, rendering it a non-viable solution.

Give all of this, I wonder if it is even possible to do what I am attempting on a continuous form ? I do this sort of thing on single forms all the time with no problems. Any ideas or suggestions would be very welcome. Thank you !

VBA Code:
Private Sub Form_Current()
EmployeeCombo.Requery
End Sub

Private Sub CompanyCombo_AfterUpdate()
EmployeeCombo.Requery
End Sub
0
Comment
Question by:Paul McCabe
  • 2
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40529448
yes, it is possible. I have done this in some of my projects
0
 
LVL 35

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40529711
Here is an example I created to explain the problem and to offer a solution.  I should warn you that it works in continuous view but not in data sheet view.
FixCascadingCombos130128.zip
0
 

Author Comment

by:Paul McCabe
ID: 40529879
The file you attached described the probem very clearly and the solution worked perfectly (yes, I am using continuous view). Excellent. Thank you so much !!!
0
 
LVL 35

Expert Comment

by:PatHartman
ID: 40531629
Glad you found it useful.  Conditional formatting solves certain problems regarding control properties in continuous and data sheet forms but not the problem with cascading combos.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question