WHERE CONDITION IN REPORT

J

Jess

I have a report which I open from a form with the openreport command. I
execute the report with a where condition whose string is as follows:

"FERC_status <> 'L'"

FERC_status is a field on the table my report is based on.

Everytime the openreport is invoked Access asks me the parameter value for
FERC_status. What is going on here? I already supplied the value for
FERC_status (<> "L")

Thanks for your help
 
M

Marshall Barton

Jess said:
I have a report which I open from a form with the openreport command. I
execute the report with a where condition whose string is as follows:

"FERC_status <> 'L'"

FERC_status is a field on the table my report is based on.

Everytime the openreport is invoked Access asks me the parameter value for
FERC_status. What is going on here? I already supplied the value for
FERC_status (<> "L")


If you are prompted for something in a query or report, it
means that Access can not find it in the query's table(s) or
in the report's record source table/query. Typically, this
is because the name is misspelled or the field was not
included in the report's record source query's field list.
 
J

Jeanette Cunningham

Check that you have the correct spelling for the field FERC_status.
Check that the field FERC_status is really in the query the report is based
on.
If the above doesn't help, close the report and open the query it is based
on, access will probably give the same error message.
Post the full line of code that opens the report.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
J

John W. Vinson

I have a report which I open from a form with the openreport command. I
execute the report with a where condition whose string is as follows:

"FERC_status <> 'L'"

FERC_status is a field on the table my report is based on.

Everytime the openreport is invoked Access asks me the parameter value for
FERC_status. What is going on here? I already supplied the value for
FERC_status (<> "L")

Thanks for your help

This means that (despite what you think!) that FERC_Status is *not* in the
form's Recordsource. Is that recordsource the table? or a query based on the
table? If a query, is FERC_Status included?

This could also be a spelling issue - if the field is actually named
"FERC Status" then (under some circumstances) Access will show it to you with
an underscore replacing the blank but the name still must be referenced with a
blank:

"[FERC Status] <> 'L'"
 

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