Report Criteria in Form

J

Jennie

I have a form which asks for a beginning date, ending date, and 2 other
criteria to generate a report. When I try to preview the report, a criteria
box pops up asking for the same criteria again. I have checked the
paramaters, unbound text box names, and the criteria in the query, the all
match. Any idea why the query is not recognizing the data entered into the
form?
 
D

Douglas J. Steele

While the query may be in use for a form, as far as Access is concerned,
your report is using a completely different query.

The easiest approach would be to create a form with unbound controls to
accept the four parameters. Have your query refer to those form controls
rather than using named parameters (i.e.: rather than [Beginning Date] as
the parameter, use Forms![NameOfForm]![NameOfControl]). As long as the
parameter form is open when your form and/or report is open, you won't be
prompted.
 
J

Jennie

I have the paramaters entered in as [Forms]![ReportMenu]![BeginningDate] and
[Forms]![ReportMenu]![EndingDate]. The query worked fine for a year and then
suddenly started doing this.

Douglas J. Steele said:
While the query may be in use for a form, as far as Access is concerned,
your report is using a completely different query.

The easiest approach would be to create a form with unbound controls to
accept the four parameters. Have your query refer to those form controls
rather than using named parameters (i.e.: rather than [Beginning Date] as
the parameter, use Forms![NameOfForm]![NameOfControl]). As long as the
parameter form is open when your form and/or report is open, you won't be
prompted.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jennie said:
I have a form which asks for a beginning date, ending date, and 2 other
criteria to generate a report. When I try to preview the report, a
criteria
box pops up asking for the same criteria again. I have checked the
paramaters, unbound text box names, and the criteria in the query, the all
match. Any idea why the query is not recognizing the data entered into the
form?
 
D

Douglas J. Steele

You say that "a criteria box pops up asking for the same criteria again". If
the ReportMenu form is open, no pop-up should occur. If the form is open,
did the BeginningDate and EndingDate controls perhaps get renamed on the
form?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Jennie said:
I have the paramaters entered in as [Forms]![ReportMenu]![BeginningDate]
and
[Forms]![ReportMenu]![EndingDate]. The query worked fine for a year and
then
suddenly started doing this.

Douglas J. Steele said:
While the query may be in use for a form, as far as Access is concerned,
your report is using a completely different query.

The easiest approach would be to create a form with unbound controls to
accept the four parameters. Have your query refer to those form controls
rather than using named parameters (i.e.: rather than [Beginning Date] as
the parameter, use Forms![NameOfForm]![NameOfControl]). As long as the
parameter form is open when your form and/or report is open, you won't be
prompted.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jennie said:
I have a form which asks for a beginning date, ending date, and 2 other
criteria to generate a report. When I try to preview the report, a
criteria
box pops up asking for the same criteria again. I have checked the
paramaters, unbound text box names, and the criteria in the query, the
all
match. Any idea why the query is not recognizing the data entered into
the
form?
 

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