A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

queries and reports



 
 
Thread Tools Display Modes
  #1  
Old November 29th, 2008, 04:39 PM posted to microsoft.public.access.gettingstarted
DJ Finnegan[_2_]
external usenet poster
 
Posts: 19
Default queries and reports

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.
  #2  
Old November 29th, 2008, 05:30 PM posted to microsoft.public.access.gettingstarted
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default queries and reports

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;

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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.



  #3  
Old November 29th, 2008, 05:39 PM posted to microsoft.public.access.gettingstarted
DJ Finnegan[_2_]
external usenet poster
 
Posts: 19
Default queries and reports

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...

"Ken Snell (MVP)" wrote:

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;

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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.




  #4  
Old November 29th, 2008, 06:12 PM posted to microsoft.public.access.gettingstarted
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default queries and reports

Show us the SQL statement of the query that the report is using.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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...

"Ken Snell (MVP)" wrote:

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;

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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.






  #5  
Old November 29th, 2008, 06:21 PM posted to microsoft.public.access.gettingstarted
DJ Finnegan[_2_]
external usenet poster
 
Posts: 19
Default queries and reports

I'm not sure what you mean. How would I go about that?

"Ken Snell (MVP)" wrote:

Show us the SQL statement of the query that the report is using.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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...

"Ken Snell (MVP)" wrote:

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;

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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.






  #6  
Old November 30th, 2008, 01:22 AM posted to microsoft.public.access.gettingstarted
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default queries and reports

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.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
I'm not sure what you mean. How would I go about that?

"Ken Snell (MVP)" wrote:

Show us the SQL statement of the query that the report is using.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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...

"Ken Snell (MVP)" wrote:

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;

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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.








  #7  
Old December 1st, 2008, 01:34 AM posted to microsoft.public.access.gettingstarted
DJ Finnegan[_2_]
external usenet poster
 
Posts: 19
Default queries and reports

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"));


"Ken Snell (MVP)" wrote:

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.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
I'm not sure what you mean. How would I go about that?

"Ken Snell (MVP)" wrote:

Show us the SQL statement of the query that the report is using.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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...

"Ken Snell (MVP)" wrote:

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;

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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.









  #8  
Old December 1st, 2008, 06:15 PM posted to microsoft.public.access.gettingstarted
DJ Finnegan[_2_]
external usenet poster
 
Posts: 19
Default queries and reports

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

"Ken Snell (MVP)" wrote:

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.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
I'm not sure what you mean. How would I go about that?

"Ken Snell (MVP)" wrote:

Show us the SQL statement of the query that the report is using.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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...

"Ken Snell (MVP)" wrote:

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;

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"DJ Finnegan" wrote in message
...
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.









 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.