M
Marvin
I’m looking for some code to help me get started on part of a project.
I would like to provide the functionality on a form that allows a user to
select from five or more multi-select listboxes, checkboxes, and maybe
comboboxes for creating the Recordsource or filter for a report or other form.
For example: The user makes some selections from the controls on the form,
then clicks a button to open a report that uses their selections to set the
recordsource or filter for the report they want to view.
I would make this work by using something like this pseudo code to build
part of the SQL string:
For each ctl in Me.Controls
If ctl.tag like “Field filter†then
sqlString = sqlString & ctl.Value “ In “ & GetfieldName(ctl.name) …
End If
Next ctl
~ assemble the rest of the string and pass it as a parameter to the report ~
Etc.
If someone knows of some code that does this in a generic fashion or in a
fairly simple example, it could save me a lot of coding time.
Any help is greatly appreciated.
~ Marvin
I would like to provide the functionality on a form that allows a user to
select from five or more multi-select listboxes, checkboxes, and maybe
comboboxes for creating the Recordsource or filter for a report or other form.
For example: The user makes some selections from the controls on the form,
then clicks a button to open a report that uses their selections to set the
recordsource or filter for the report they want to view.
I would make this work by using something like this pseudo code to build
part of the SQL string:
For each ctl in Me.Controls
If ctl.tag like “Field filter†then
sqlString = sqlString & ctl.Value “ In “ & GetfieldName(ctl.name) …
End If
Next ctl
~ assemble the rest of the string and pass it as a parameter to the report ~
Etc.
If someone knows of some code that does this in a generic fashion or in a
fairly simple example, it could save me a lot of coding time.
Any help is greatly appreciated.
~ Marvin