473,387 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

using query results to search by

hi
i have a query which returns the top 5 Areas of concern
i.e Area(field name)
Area 1
Area 2
Area 3
Area 4
Area 5
the results are displayed on a continuous form
i am now trying to use this result to trigger another query
i need a way of running through the results then finding the faults
with that area
i.e
if result = Area 1 then open query faultsarea1
if result = Area 2 then open query faultsarea2
if result = Area 3 then open query faultsarea3
can anyone help please

thanks kevin

Jul 13 '06 #1
2 1322
kevcar40 wrote:
hi
i have a query which returns the top 5 Areas of concern
i.e Area(field name)
Area 1
Area 2
Area 3
Area 4
Area 5
the results are displayed on a continuous form
i am now trying to use this result to trigger another query
i need a way of running through the results then finding the faults
with that area
i.e
if result = Area 1 then open query faultsarea1
if result = Area 2 then open query faultsarea2
if result = Area 3 then open query faultsarea3
can anyone help please

thanks kevin
Could you define your problem a bit further. You have a recordsource
for the form that displays Area1..5 which has the column name Result if
I understand you correctly.

Now when do you want to run the queries? You could open up the property
sheet for Results, click the Events tab, and in the Dbl-Click event call
your routine to open up the query. Ex:
Dim strQryName As String
strQryName = "faultarea" & result
DOcmd.OpenQuery strQryName

Jul 13 '06 #2

salad wrote:
kevcar40 wrote:
hi
i have a query which returns the top 5 Areas of concern
i.e Area(field name)
Area 1
Area 2
Area 3
Area 4
Area 5
the results are displayed on a continuous form
i am now trying to use this result to trigger another query
i need a way of running through the results then finding the faults
with that area
i.e
if result = Area 1 then open query faultsarea1
if result = Area 2 then open query faultsarea2
if result = Area 3 then open query faultsarea3
can anyone help please

thanks kevin
Could you define your problem a bit further. You have a recordsource
for the form that displays Area1..5 which has the column name Result if
I understand you correctly.

Now when do you want to run the queries? You could open up the property
sheet for Results, click the Events tab, and in the Dbl-Click event call
your routine to open up the query. Ex:
Dim strQryName As String
strQryName = "faultarea" & result
DOcmd.OpenQuery strQryName
thank you for your reply
i will try this code and see how i get on thanks again

Jul 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bacci | last post by:
I have two tables. The first is "Locations" which has 52,000 zip codes w/cooresponding latitudes and longitudes. The second "Suppliers" has 2,000 company names and addresses. The user enters a...
0
by: david liu | last post by:
access 2000 query: here's what i want to do. from an asp page, perform a search on a table in access. i have used sql code in the asp page itself, but i'd rather execute a query in access. i...
1
by: SC | last post by:
I'm developing a site that may eventually have a very large database of users (hopefully, but who knows). It will be a community website where users can search each other (think Friendster,...
3
by: Jahangir | last post by:
Dear Fellows, I m in in Access VB, and working on a small project. Problem is that In main form (called search )I have made a textbox name text34, and a search button, which responsiblity is...
10
by: sesling | last post by:
I have created a query that will pull information from our database for the operators. This query will pull in on average 50,000 records. The operators need to refine the search results. I have...
1
by: vHTML | last post by:
hello everyone :) I am trying to make a page which would take a "entered" on search query from the previous page and display results in google with that query in an <iframe> in the results.htm...
14
by: Simon Gare | last post by:
Hi, have a search.asp page with results.asp page drawing data from an SQL db, problem is the user has to type the whole field value into the search box to retrieve the value on results.asp, what...
1
by: martin DH | last post by:
Slightly related previous posts: (http://www.thescripts.com/forum/thread720001.html) and (http://www.thescripts.com/forum/thread708234.html). Okay, I've had to go back the drawing board a couple...
1
by: jcf378 | last post by:
Hi all-- Does anyone have any insight as to how I might create a search form that allows a user to select criteria based on any related table in the whole database. The search form I have now only...
13
by: Robertf987 | last post by:
Hi, Yet another thing I need help with I'm affraid. I'll first explain what I want, then I'll try to explain what I have. I'm using Microsoft Access 2000. What I want is to be able to do a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.