synchronized Comboboxes don't display info after navigating off of record in main for

ShovelinFishHeads

Registered User.
Local time
Today, 13:02
Joined
Aug 4, 2016
Messages
57
I have three comboboxes on a subform that are synchronized with the first combox on the subform (four comboboxes total). I have the three "dependent" comboboxes synched by way of individual queries that read the PK of the first combobox. The AfterUpdate event of the first combobox requeries the three queries that drive the three dependent comboboxes.
These are all associated with a subform that is part of a main form such that there are muliple records driving the main form with nav buttons and the subform also has multiple records
with nav buttons.

My problem is that when I navigate to a record in the main form, the comboboxes on the subform DON'T DISPLAY INFO even though all of the text boxes related to them do show information properly.

I tried putting this in the AfterUpdate event of the main form:

Forms![Jobs]![Assignment Form].Form!CboEmployeeSelect.Requery
Forms![Jobs]![Assignment Form].Form!CboToolSelect.Requery
Forms![Jobs]![Assignment Form].Form!CboVehicleSelect.Requery

The results were not what I need.

How would you suggest this be correct?

Any help is greatly appreciated. Thanks!
 
Can you post a copy of the database --remove anything confidential; then zip?

see if these references help.
 
I have changed my code to:

Me![Assignment Form].Form!CboEmployeeSelect.Requery
Me![Assignment Form].Form!CboToolSelect.Requery
Me![Assignment Form].Form!CboVehicleSelect.Requery

This looks to be more correct, but it did not make any difference.

One solution is to put text boxes on the forms that contain what the comboboxes should be showing. This might be a better option. The text boxes to be added probably should be there anywayzz.
 
The text boxes to be added probably should be there anywayzz.
Agreed! The problem with having a Field displayed, such as one for a selected employee, using a Combobox, is that employees leave! The usual procedure is to remove them (or mark them as inactive) from/on the employee Table...in which case you end up with one of two situations:

Inactive employees are displayed in the CboEmployeeSelect Combobox, even though they are no longer employed and are not valid choices, or, if you no longer include them in the Combobo, nothing appears in the Control when you look at a historical Record!

Always assigning the selections to other Controls eliminates this problem. Plus, 'Cascading Comboboxes,' which is what you're talking about, here, should always be Unbound.

If this is a Single View Form, I'd place the Comboboxes in the Header of the Form.

Linq ;0)>
 
Thanks for contributing to this thread, missinglinq.

I used bound controls mostly just because I am about 100x more familiar with using simple queries than by using any other method for this kind of purpose. So I am really comfortable with it.

Question: What advantages are there in placing comboboxes in form headers?
 
IT's no big deal, but if the Comboboxes are simply being used for populating Textboxes, as we're talking about, here, it simply makes the user more aware that it's being used for that purpose, whereas having it in the Detail Section of each Record tends to make them think that it should always be populated...not simply used to select data for inclusion.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom