custom dialog for parameter query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have records that have certain classifications. the classifications are
entered via an option group, so the resulting data in the table is an integer
value. i want to run reports by classification, so i have a parameter query
that asks the user for a value. i want the user to be able to choose the
value for this parameter query in the same way that the data is entered
originally. in other words, i want them to be able to choose an option
button from an option group instead of entering an integer value. i created
a dialog that contains this option group and i created a macro to display
this dialog and i invoke this macro from the reports OnOpen event. (this was
all according to Help). i also added 'Forms.[MyDialog].[optiongroup]' to the
'criteria' area in the query that feeds this report. but i am apparently
missing the tie-in with all these components. when the report opens, the
dialog displays and i can select my data. but nothing happens from there and
when i close the dialog (click on the 'X'), the standard parameter query
dialog pops up asking me for 'Forms.[MyDialog].[optiongroup]'. i think i'm
getting close, i'm just missing something to link all these pieces together.

Help?
 
Stan

First, try using "!" instead of "." as separators.

Next, consider trying a similar approach ... but don't open the form after
you start the report. Instead, first open the form and collect the
criteria. Next, add a <Print Report> command button that opens the report.
Third, use a query that points to the form (using the
Forms![YourForm]![YourControl] parameter) as the source for your report.
This way, when the report opens, it looks to the query. When the query
starts up, it looks to the form. Since you started there, it should all
flow.

Good luck

Jeff Boyce
<Access MVP>
 
Viola!! Sometimes i just need a kick in the logic! Thanks for your help!

Jeff Boyce said:
Stan

First, try using "!" instead of "." as separators.

Next, consider trying a similar approach ... but don't open the form after
you start the report. Instead, first open the form and collect the
criteria. Next, add a <Print Report> command button that opens the report.
Third, use a query that points to the form (using the
Forms![YourForm]![YourControl] parameter) as the source for your report.
This way, when the report opens, it looks to the query. When the query
starts up, it looks to the form. Since you started there, it should all
flow.

Good luck

Jeff Boyce
<Access MVP>

Stan said:
I have records that have certain classifications. the classifications are
entered via an option group, so the resulting data in the table is an integer
value. i want to run reports by classification, so i have a parameter query
that asks the user for a value. i want the user to be able to choose the
value for this parameter query in the same way that the data is entered
originally. in other words, i want them to be able to choose an option
button from an option group instead of entering an integer value. i created
a dialog that contains this option group and i created a macro to display
this dialog and i invoke this macro from the reports OnOpen event. (this was
all according to Help). i also added 'Forms.[MyDialog].[optiongroup]' to the
'criteria' area in the query that feeds this report. but i am apparently
missing the tie-in with all these components. when the report opens, the
dialog displays and i can select my data. but nothing happens from there and
when i close the dialog (click on the 'X'), the standard parameter query
dialog pops up asking me for 'Forms.[MyDialog].[optiongroup]'. i think i'm
getting close, i'm just missing something to link all these pieces together.

Help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Parameter Query Won't Run 0
Parameters in Queries 1
Parameter Query 1
Union Query 2
dialog box/parameter query 2
Custom parameter dialog boxes 2
Export XML Parameter Query 3
Problem with a parameter query 7

Back
Top