queries and reports

D

DJ Finnegan

I have a query with the parameter "co or vo" to pull in records. It works
fine on query however, when i use report I get an additional request for area
(where this parameter is located). this is a valid parameter and I don't want
users to have to type parameter.

Should I be using a different value, when I use "and" no record show.

Thanks in advance guys.
 
K

Ken Snell \(MVP\)

If the query asks you for the parameter, then a report based on that query
will ask you for the parameter each time the report must run that query,
which may be many times if it's used in a subreport (once for each grouped
value in the subreport). It's better if you use a form's textbox to enter
the parameter value, then keep the form open and let the query read the
value from that textbox as a parameter:

SELECT * FROM Table
WHERE Field = Forms!NameOfForm!NameOfTextbox;
 
D

DJ Finnegan

I don't have the parameter set to ask...the only ask parameter is the date.
The paramet is set to = "VO" or "CO". It would appear the report itself
opens it up as a question...
 
K

Ken Snell \(MVP\)

Open your query in design view. On the toolbar, click on the Query View
button and select SQL View. Copy all the text that you see in the window
that opens, and paste it into your reply to this post.
 
D

DJ Finnegan

Here it is, thanks for explaining...i didn't know that was an option

SELECT [workplan import].Analyst, [workplan import].[Activity Type],
[workplan import].[Function Code], [workplan import].CUSIP, [workplan
import].Seq, [workplan import].Task, [workplan import].[Task Date/Action],
[workplan import].[Supervisor Comments], [workplan import].[Workplan Date]
FROM [workplan import]
WHERE ((([workplan import].[Workplan Date])=[WHAT DATE?]) AND (([workplan
import].Area)="co") AND (([workplan import].Supervisor)="MUNOZ")) OR
((([workplan import].Area)="vo"));
 
D

DJ Finnegan

Ken thanks for all your help but I did solve it. The solution was, of course,
so simple it eluded me. I designed the reports and then changed parameters in
query. After deleting the reports and redesigning they work just fine.
Thanks again for everything.
DJ
 

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