By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,255 Members | 2,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,255 IT Pros & Developers. It's quick & easy.

Help with a Form and Multiple Queries

P: n/a
Hi, I have 3 tables from 3 different databases. I need to create one
form where I can have the user type in a name and click a query button
to search one database, click other query button to seach another
database, etc. The results will be displayed on a unique form for that
database. I don't want the user to have to type the entry over and
over again. I also have to allow for wildcards. Also all the tables
have different field names that the user will be searching and nothing
in common, therefore they are not linked together. Help I am confused
and have been trying everything. Thanks.

May 19 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I am assuming that when you click your button for a particular DB that
you want to display the results in a subform. In the code for each
button you will need to set the value for your subform. You can do
that with:
Me.SubformName.SourceObject = NameOfFormYouWant

SubFormName is the name you give the subform on your main form.

In the record source for each form you are going to need to put this in
the criteria for the name: Like Forms!MainForm!FieldName & "*" This
will match all names that start with the letters your user typed in.
EX: Smith will match Smith, Smithson, Smithy, etc. Where I put
FieldName, you need to put the name you gave the Name field on your
main form, and MainForm is the actual name of your form.

Hope that helps!

May 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.