Cascading combo box works (sometimes)

ghorwith

New member
Local time
Today, 12:49
Joined
Dec 11, 2018
Messages
3
I've created a form with a cascading combo box, which works perfectly when the form opens as a standalone form. However, when the form is launched from a navigation form button, access prompts to Enter a parameter value for the combo box. Any thoughts on why the form behaves differently when launched from a navigation button?
 
Hi,

They will behave differently depending on how you have the combo Row Source set up. If you’re using an absolute form reference, then the syntax changes between a standalone form and one embedded as a subform in a Navigation Form.
 
Understood, and it raises 2 questions 1. How does one make the reference relative? If that isn't possible, then is it necessary to provide the entire path (ie mainform, button, subform, field)? Access doesn't appear to do this with the built in drop down menus when adding the path.
 
For a standard form/subform, the control reference syntax is fairly straightforward.
See e.g. http://allenbrowne.com/casu-04.html

However referring to controls in navigation forms can be rather difficult if you alter the basic design in any significant way such as using nested or tabbed subforms. The reason is that they are not standard forms
That is one reason why many developers avoid the built in navigation form (similarly split forms)

I would suggest you do one of the following:
1. Save the selected combo value as a public variable (or tempvar)
If using a variable, create a public function to grab the value.
Then use the function in your filter criteria for the next stage
2. Design your own form/subforms that look like the navigation form you have now but behave like standard forms
 
This is one of the problems with the inbuilt Navigation forms, the references get very confusing, and the reason the wizards won't work is because the forms aren't loaded until required.
 

Users who are viewing this thread

Back
Top Bottom