Solved

Are cascading combo boxes on a continuous form possible ?

Posted on 2015-01-03
4
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 37

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 37

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

734 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