Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 27th, 2004, 07:03 PM
meshell meshell is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 meshell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Passing parameters to several queries

Hello,

I would like to pass the same several paramaters to multiple queries and reports. The parameters are the same for all reports and queries and only change every several weeks. I do not want the user to pass the parameters. Rather than change the criteria within each individual query and report, I have stored the parameter values in a table. Each query or report includes the parameter table. This works fine in one report where the remaining tables are joined with inner joins, and the parameter table is not joined to the other tables. However method does not work in a query that uses outer joins. The addition of the "unjoined" parameter table results in a SQL error.

Is this an acceptable method of passing parameters to several queries? Can you suggest a solution to my problem, or a better method of passing parameters?

Thank you

Bob-

Reply With Quote
  #2  
Old November 29th, 2004, 12:31 PM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
Bob,

There are several ways to do this, but from your post what I would suggest is to make a form bound to your table that has your parameters listed in. Then for each query and report set the parameters to this form using the associated fields. Depending on how you run each query or report, open this form in the hidden view before running the query or report to pass the parameters. You can change the parameter criteria in the table as needed and the queries and reports will change to the new criteria you entered.

lwells

Reply With Quote
  #3  
Old November 30th, 2004, 09:21 PM
waltg72 waltg72 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 25 waltg72 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re:Passing parameters to different query

Hi,

I have a simple suggestion that might come in handy in passing parameters to your query. First, you must use relationship table like for example [title] from book table is related to [title] from author table. Be sure that they both have the same data type.

Once you have the link between this two tables, book table and author table. You can create a joint query using book table and author table wherein your [author field] from author table can be displayed based on your [title field] from book table.

In reports, you can also use the query like [Enter Author] your criteria in author field of your author table, then in report header page. In this example, insert this ="Author name " & [Enter Author] this will concatenate the text "Author name" and [your parameter]

Tim


Quote:
Originally Posted by meshell
Hello,

I would like to pass the same several paramaters to multiple queries and reports. The parameters are the same for all reports and queries and only change every several weeks. I do not want the user to pass the parameters. Rather than change the criteria within each individual query and report, I have stored the parameter values in a table. Each query or report includes the parameter table. This works fine in one report where the remaining tables are joined with inner joins, and the parameter table is not joined to the other tables. However method does not work in a query that uses outer joins. The addition of the "unjoined" parameter table results in a SQL error.

Is this an acceptable method of passing parameters to several queries? Can you suggest a solution to my problem, or a better method of passing parameters?

Thank you

Bob-

Reply With Quote
  #4  
Old January 13th, 2005, 10:46 AM
wtolentino wtolentino is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 wtolentino User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
lwells,

I came across this forum and I was looking for some sample codes of a Form that pass a parameters to a reports. I appreciate if you had some sample codes that you can provide.

Thanks,
Warren

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Passing parameters to several queries


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT