Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Are cascading combo boxes on a continuous form possible ?

Posted on 2015-01-03
4
Medium Priority
?
247 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 39

Accepted Solution

by:
PatHartman earned 2000 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 39

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

715 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