"Enter Parameter Value" Question

Saberan

New Member
Joined
Mar 10, 2016
Messages
7
I have a form (FormSpec) that is filtered by the selection made from a combo box on another form (FormSelect). This works but I've now been asked to make a special section (FormBoss) in the database to allow quick access to certain forms and reports (FormSpec being one). Ultimately my question is can a forms filter property look for a field value on FormSpec, and if its not available, look for a value on FormBoss without having the "Enter Parameter Value" window come up?
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
You would have to try to get the value you want first by testing if the form is open, and if not, see if the other form is open. If not, not sure what you want to do at that point - maybe terminate or supply a default value? You'd have to say what's prompting the parameter dialog (query/code?) to give me a clue as to what you're doing, so some elaboration is needed. If it's a query, you might be able to return the value to the query by using a function call as criteria. If you are opening a form and applying a filter, the same sort of function can pass the value to the opening form via the DoCmd.OpenForm statement. To try to get a value from an open form:

If currentproject.allforms(nameOfForm).IsLoaded Then someVariable = Forms!nameOfForm.ControlName

You would construct an If block to deal with a hierarchy of form choices. Note: I presume you know you cannot literally use what I wrote.
 
Upvote 0

Forum statistics

Threads
1,221,825
Messages
6,162,165
Members
451,750
Latest member
dofrancis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top