Solved

Are cascading combo boxes on a continuous form possible ?

Posted on 2015-01-03
4
226 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 119

Expert Comment

by:Rey Obrero
Comment Utility
yes, it is possible. I have done this in some of my projects
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
Comment Utility
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
Comment Utility
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 34

Expert Comment

by:PatHartman
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now