Parameter query in a form using a customer dialog box

G

Guest

I am trying to use a custom dialog box to specified a parameter query when I
run a form. I think I have carefully followed instructions, but every time
the query runs, the standard parameter query dialog box pops up with the form
reference, instead of the custome dialog box. That is, the
[Forms]![Parameter Dialog]![Approved Date] shows up as the message in the
standard parameter dialog box. Can anyone help?
 
F

fredg

I am trying to use a custom dialog box to specified a parameter query when I
run a form. I think I have carefully followed instructions, but every time
the query runs, the standard parameter query dialog box pops up with the form
reference, instead of the custome dialog box. That is, the
[Forms]![Parameter Dialog]![Approved Date] shows up as the message in the
standard parameter dialog box. Can anyone help?

How are you opening the query / form?
The form [Parameter Dialog] must be still be open when the query is
run.
 
G

Guest

So, if I run an event procedure or macro to open the form first, then open
the form (which runs a query) that should work?


fredg said:
I am trying to use a custom dialog box to specified a parameter query when I
run a form. I think I have carefully followed instructions, but every time
the query runs, the standard parameter query dialog box pops up with the form
reference, instead of the custome dialog box. That is, the
[Forms]![Parameter Dialog]![Approved Date] shows up as the message in the
standard parameter dialog box. Can anyone help?

How are you opening the query / form?
The form [Parameter Dialog] must be still be open when the query is
run.
 
F

fredg

So, if I run an event procedure or macro to open the form first, then open
the form (which runs a query) that should work?

fredg said:
I am trying to use a custom dialog box to specified a parameter query when I
run a form. I think I have carefully followed instructions, but every time
the query runs, the standard parameter query dialog box pops up with the form
reference, instead of the custome dialog box. That is, the
[Forms]![Parameter Dialog]![Approved Date] shows up as the message in the
standard parameter dialog box. Can anyone help?

How are you opening the query / form?
The form [Parameter Dialog] must be still be open when the query is
run.

If the query is the record source for a form, code the form's Open
Event:
DoCmd.OpenForm "Parameter Dialog", , , , , acDialog

Code this form's Close event:
DoCmd.Close acForm,"Parameter Dialog"

Code a command button click event on the "Parameter Dialog" form:
Me.Visible = False

In the query, as criteria for the date field, write:
forms![Parameter Dialog]![Approved Date]

Open your form. It will open the [Parameter Dialog].
Enter your date and click the command button.
The Parameter form will be hidden (but still be open), and your form
will display the query data.
When you close the form, it will close the Parameter Dialog form.

The above works the same way if you are using a report.
 
G

Guest

Fred I Have a smilar problem. I am trying to make 3 command buttons sort
invoices on a subform based on a query. The query stores invoice overdue
dates, and I want the user to be able to hit the 30,60,90 days button and the
subform just shows the appropriate range.

I get exacly the same error message ecept my fieldname is different:


[Forms]![Parameter Dialog]![DaysOverDue] shows up as the message in the
standard parameter dialog box. Can anyone help?

No matter how I tackle it, i keep coming back to the same problem...

HELP PLEASE!


fredg said:
So, if I run an event procedure or macro to open the form first, then open
the form (which runs a query) that should work?

fredg said:
On Sun, 3 Oct 2004 11:29:11 -0700, GeorgeH wrote:

I am trying to use a custom dialog box to specified a parameter query when I
run a form. I think I have carefully followed instructions, but every time
the query runs, the standard parameter query dialog box pops up with the form
reference, instead of the custome dialog box. That is, the
[Forms]![Parameter Dialog]![Approved Date] shows up as the message in the
standard parameter dialog box. Can anyone help?

How are you opening the query / form?
The form [Parameter Dialog] must be still be open when the query is
run.

If the query is the record source for a form, code the form's Open
Event:
DoCmd.OpenForm "Parameter Dialog", , , , , acDialog

Code this form's Close event:
DoCmd.Close acForm,"Parameter Dialog"

Code a command button click event on the "Parameter Dialog" form:
Me.Visible = False

In the query, as criteria for the date field, write:
forms![Parameter Dialog]![Approved Date]

Open your form. It will open the [Parameter Dialog].
Enter your date and click the command button.
The Parameter form will be hidden (but still be open), and your form
will display the query data.
When you close the form, it will close the Parameter Dialog form.

The above works the same way if you are using a report.
 

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

Top