Report Parameter Value

T

Ted

I have a report based on a cross-tab query. I don't
understand the parameters that I am prompted for.

I get one prompt to enter date - which is good and
correct - but then I am prompted to enter data again. When
I enter the date a second time, I get a jet engine error
stating it does not recognize " as a vaild field or
expression. If I run the cross-tab query independent of
the report it runs fine with only a single prompt for date.

Any ideas or suggestions?

Also, I can't tell this group how much I appreciate
everyone's time, patience and help in the last couple of
weeks as I work through some these fundamental learning
issues. Thanks to everyone that has taken time to read and
respond!
 
F

fredg

Ted said:
I have a report based on a cross-tab query. I don't
understand the parameters that I am prompted for.

I get one prompt to enter date - which is good and
correct - but then I am prompted to enter data again. When
I enter the date a second time, I get a jet engine error
stating it does not recognize " as a vaild field or
expression. If I run the cross-tab query independent of
the report it runs fine with only a single prompt for date.

Any ideas or suggestions?

Also, I can't tell this group how much I appreciate
everyone's time, patience and help in the last couple of
weeks as I work through some these fundamental learning
issues. Thanks to everyone that has taken time to read and
respond!

Ted,
I would suggest you use a form to enter the query parameter data.
Change the query criteria from something like:
= [Enter Start Date] to
= forms!FormName!StartDate

As long as the form remains open when the report is run, you will not be
prompted for any parameters.

You can open the form from the Report's Open event:
DoCmd.OpenForm "FormName", , , , , acDialog

Then close it in the Report's Close event:
DoCmd.Close acForm, "FormName"

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

The Form will appear when you open the report.
Enter the date wanted.
Click the command button.
The Report will run.
When you close the report, the form will also close.

In the Cross-tab query, you did remember to enter the parameter and it's
datatype in the Query Parameter dialog didn't you?
In Query Design View...
Query + Parameters
 
E

Evi

Was it a report you designed or one that was imposed on you? If the latter,
the parameter could be a text box in the report. It might be in the Report's
code. It could even be a left over parameter from a previous filter. (Look
in Report's Properties for this.) Does the report have a subreport?
Evi
 
T

Ted

-----Original Message-----
Ted said:
I have a report based on a cross-tab query. I don't
understand the parameters that I am prompted for.

I get one prompt to enter date - which is good and
correct - but then I am prompted to enter data again. When
I enter the date a second time, I get a jet engine error
stating it does not recognize " as a vaild field or
expression. If I run the cross-tab query independent of
the report it runs fine with only a single prompt for date.

Any ideas or suggestions?

Also, I can't tell this group how much I appreciate
everyone's time, patience and help in the last couple of
weeks as I work through some these fundamental learning
issues. Thanks to everyone that has taken time to read and
respond!

Ted,
I would suggest you use a form to enter the query parameter data.
Change the query criteria from something like:
= [Enter Start Date] to
= forms!FormName!StartDate

As long as the form remains open when the report is run, you will not be
prompted for any parameters.

You can open the form from the Report's Open event:
DoCmd.OpenForm "FormName", , , , , acDialog

Then close it in the Report's Close event:
DoCmd.Close acForm, "FormName"

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

The Form will appear when you open the report.
Enter the date wanted.
Click the command button.
The Report will run.
When you close the report, the form will also close.

In the Cross-tab query, you did remember to enter the parameter and it's
datatype in the Query Parameter dialog didn't you?
In Query Design View...
Query + Parameters
--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
.
This just keeps getting more and more complicated. I
guess I can use a form if I have to...I don't have much
experience with them.

I have been working on this little (not so little anymore)
project for about a week and I thought I was finally there
until I tried to format the report and then this error.
Very frustrating... I guess I just don't understand why
the cross-tab runs perfectly unless it is executed from a
report. Just doesn't make any sense to me. I am doing this
to learn, but it would be slightly encouraging if I could
ever get to a finishing point rather than always having to
add one more element.

Yes, I finally figured-out to enter parameters in the
query through trial & error with a previous error message
and got past it. I just can't find a parameter setting
that eliminates this current problem.

Thanks for you insight and I will travel down the FORMS
road, I guess.
 
T

Ted

It is one that I designed. It's kind of a convoluted
situation. I build a table, then based on the table I run
a query (Net Aging Query) to assign values to the records.
The values only exist in Net Aging Query. I then have a
cross-tab query based on the Net Aging Query that lays-out
the data in so that I can print the report in the proper
format. Everything works fine until I execute through the
report and then I encounter the Jet Engine error.

Very frustrating...
 

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


Top