PDA

View Full Version : Access Query Question


Cliff
6th July 2001, 12:52.01 AM
All,

Am finally getting around to doing some queries in Access using the "ALL" database. Would like to have the queries prompt me for the track code.....(think it says something like "Enter Parameter Value" on some of my queries currently). How do I make that prompt appear and function correctly?

Thanks in advance,
Cliff

MikeDee
6th July 2001, 05:03.27 AM
Cliff

In the Criteria cell for each field you want to use as a parameter, type a prompt enclosed in square brackets. Access will display this prompt when the query is run. The text of the prompt must be different from the field name, although it can include the field name.

For example if you want Enter Track Code. Type [Enter Track Code] in the criteria cell of the tTrack field in the query design. and it will ask your for the track code.


If you are getting asked for a prameter value when you did not design it in your query. Then you have a field name in the query that access can't find. Look at the fields in your query and you will find one that starts with expr1: and a blank this will be the offending field.

Cliff
8th July 2001, 05:32.26 PM
OK,

Thanks Mike. Can you also set up an ROI report that will prompt you for the query table, or, do you have to have an ROI report set up with the info already in there (in other words, one for each query.....which is what I am now doing)?

Thanks,
Cliff

MikeDee
9th July 2001, 12:37.28 PM
I would think so, but I don't use the ROI report maybe rick could comment on that one I think he is the orginal developer of the roi report

Rick
9th July 2001, 12:54.23 PM
I didn't do the original ROI Report. I don't remember who did.

What I do is have the query and the report windows open at the same time in reduced size so I can quickly change and save the query; then run the report to test it.

I use three queries in the longshots chart. You could probably do the same thing and do a by track query. You would just have to change the criteria in two of the queries to run it each time.

Doing it my way it takes one query to get the winners of the criteria. It takes another query to get the total horses that qualify for the query. The last query uses the first two queries to come up with your user defined fields like winning percentage.