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 July 20th, 2009, 07:54 AM
loepem loepem is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 11 loepem User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 31 m 35 sec
Reputation Power: 0
Exclamation Filtered Data Linked to Query

I'm not sure if this is possible, or if there is a better way to do this.

I have a form with data from a table in tabular form. My table has over 100 fields, but I am only using 10 fields to filter the data. However, I would like to be able to link to a query that brings up all of the information when I filter the form.

My question is: Is there a way to link up or use a command button that will bring me to a query that will show all of the fields for only the specific filtered data?

Any help would be greatly appreciated!

Reply With Quote
  #2  
Old July 21st, 2009, 07:44 AM
SoftwareMatters SoftwareMatters is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 14 SoftwareMatters User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 51 sec
Reputation Power: 0
Are you using the in-built filter or have you created your own?

You could build your query with all the fields in and to filter on the 10 fields the criteria could look at controls on your form with the filter criteria in.

Reply With Quote
  #3  
Old July 21st, 2009, 07:51 AM
loepem loepem is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 11 loepem User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 31 m 35 sec
Reputation Power: 0
I have created my own. They are text or combo boxes for each field with a command button that filters the records and another command button to reset the data.

That query sounds like it would be something i would want, could you please elaborate? I'm not the best at building queries. Thanks!

Reply With Quote
  #4  
Old July 21st, 2009, 08:36 AM
SoftwareMatters SoftwareMatters is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 14 SoftwareMatters User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 51 sec
Reputation Power: 0
Ok, try this:
1. Create a query in design view and add the table.
2. Dbl-click on the * at the top of your table (in the query) to bring all the fields in.
3. Dbl-click each field that you want to filter on to add them to the query but untick them so they do not show twice.
4. In the criteria for each filtered column add the control name e.g. if your form was called test and the filter control was called filter do this: [forms]![test]![filter] and so on.

Reply With Quote
  #5  
Old July 22nd, 2009, 08:09 AM
loepem loepem is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 11 loepem User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 31 m 35 sec
Reputation Power: 0
I have made my query but when I press the command button I made to run the query, it asks for parameter values? When I insert parameter values, it works, but I would like it to be automatic.

Also, is there a way the query could open a form displaying the data?

Thanks so much for the help.

Reply With Quote
  #6  
Old July 22nd, 2009, 08:34 AM
loepem loepem is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 11 loepem User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 31 m 35 sec
Reputation Power: 0
I figured out the parameter values and now it works, however, if there are multiple results from the filter, the query opens only the first record. I would like it so that if there are four results for the filter, then four results would appear in the query. Thanks!

Reply With Quote
  #7  
Old July 23rd, 2009, 06:32 AM
SoftwareMatters SoftwareMatters is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 14 SoftwareMatters User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 51 sec
Reputation Power: 0
Quote:
Originally Posted by loepem
...if there are multiple results from the filter, the query opens only the first record. I would like it so that if there are four results for the filter, then four results would appear in the query. Thanks!


I don't quite understand why. If the query is setup correctly it should display the same as the form.

Reply With Quote
  #8  
Old July 23rd, 2009, 06:57 AM
loepem loepem is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 11 loepem User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 31 m 35 sec
Reputation Power: 0
I set the query up following your instructions and it works perfectly with opening the results. It's just that it only opens the results that I click on. So if I click in a text box on record #3, then only record #3 will appear when running the query. It's not too much of a problem, but if you do know how to fix it I would appreciate it.

Otherwise, thanks for the help!

Reply With Quote
  #9  
Old July 23rd, 2009, 07:21 AM
SoftwareMatters SoftwareMatters is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 14 SoftwareMatters User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 51 sec
Reputation Power: 0
Yes, I think I know what the problem is. Because it is a tabular form the query is reading (filtering) from which ever record you have selected.

To get around this you would have to put the filter criteria (your ten filter fields) in the header of the form.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Filtered Data Linked to Query


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




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

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




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 12 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek