473,378 Members | 1,527 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,378 software developers and data experts.

Search Multiple Queries with One Entry

I have a form that has 6 command buttons on it. Each command button
runs a different query with a wildcard parameter value that looks in 6
different tables in 6 different linked databases. None of the
databases are joined or have anything in common. Right now the users
have to key in the same lookup string for every button. Is there a way
to have a text box on the form, where the user can key the wildcard
text string and then click on the button and the query would return the
results. Example: I am looking for IBM in each one of the databases.
I would like to type IBM in the text box on the form, when click Search
DBOne and search that database, when just click the next search button
for DBTwo, without retyping IBM everytime. Help I have tryed
everything and I just can't see to get it to work. I am so confused.
Thanks.

May 23 '06 #1
3 2122
one way is to point the queries at the open form to collect the input.
Say you have a textbox, called "txtCriterion" and your form is called
"frmSearch"

Then you could modify your queries so they all look something like
this:

SELECT....
FROM ...
WHERE SomeField=Forms![frmSearch]![txtCriterion]

Then you could make all of the queries run in the click event of a
single button...

DoCmd.OpenQuery "qryMyQuery1"
DoCmd.OpenQuery "qryMyQuery2"

May 23 '06 #2
Thank you so much. I finally got it to work. I have one question, if
my users what the ability to but in partial names, where would I use
the wildcard?

Thanks

pi********@hotmail.com wrote:
one way is to point the queries at the open form to collect the input.
Say you have a textbox, called "txtCriterion" and your form is called
"frmSearch"

Then you could modify your queries so they all look something like
this:

SELECT....
FROM ...
WHERE SomeField=Forms![frmSearch]![txtCriterion]

Then you could make all of the queries run in the click event of a
single button...

DoCmd.OpenQuery "qryMyQuery1"
DoCmd.OpenQuery "qryMyQuery2"


Jun 1 '06 #3
Jeemo
6
Thank you so much. I finally got it to work. I have one question, if
my users what the ability to but in partial names, where would I use
the wildcard?

Thanks

pietlinden@hotmail.com wrote:[color=blue]
> one way is to point the queries at the open form to collect the input.
> Say you have a textbox, called "txtCriterion" and your form is called
> "frmSearch"
>
> Then you could modify your queries so they all look something like
> this:
>
> SELECT....
> FROM ...
> WHERE SomeField=Forms![frmSearch]![txtCriterion]
>
> Then you could make all of the queries run in the click event of a
> single button...
>
> DoCmd.OpenQuery "qryMyQuery1"
> DoCmd.OpenQuery "qryMyQuery2"[/color]
Try this:

SELECT...
FROM...
WHERE SomeField LIKE Forms![frmSearch]![txtCriterion] & "*"
Jun 2 '06 #4

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

Similar topics

5
by: AaronV | last post by:
Hello, I'm a webmaster for a college newspaper and I'm implementing an article search. I'm running PHP with a MySQL database to store the weekly stories. Does anyone know of an article that...
4
by: dave | last post by:
I am wondering if the following can be done. I want to setup a search page that utilizes full text searching in sql2000. I want the user to type in say "where is bill" and have the query search...
1
by: RiceGuy | last post by:
Hi! I'm looking for ideas on what would the best approach to design a search system for a RSS feeds. I will have some 50 RSS feeds (all RSS 2.0 compliant) stored locally on the web server. Now I'm...
0
by: MHenry | last post by:
Hi, I know virtually nothing about creating Macros in Access. I would appreciate some help in creating a Macro or Macros that automatically run(s) 14 Queries (three Make Table Queries, and 11...
6
by: San | last post by:
Hey, I need to create a form with several text boxes in which users type in key words, press a command button on the form and it opens a matching record. Thanking you in advance.
8
by: beretta819 | last post by:
Ok, so I apologize in advance for the wordiness of what follows... (I am not looking for someone to make this for me, but to point me in the right direction for the steps I need to take.) I was...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
6
by: simon.robin.jackson | last post by:
Ok. I need to develop a macro/vba code to do the following. There are at least 300 corrections and its expected for this to happen a lot more in the future. Therefore id like a nice...
4
by: student4lifer | last post by:
If I have a multidimentional array that contains many arrays inside as follows: $voters=array(array('name'=>'Joe', 'profession'=>'blumbing', 'state'=>'Ohio'), array('name'=>'Obama',...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.