Solved

Search Form Across multiple Access and SQL databases

Posted on 2012-03-18
4
288 Views
Last Modified: 2012-03-19
Hello,


In this question I'm looking for some conceptual guidance rather than specific help.

I am creating an Access front end to make it easier for users to view or write information from a couple of different databases.  Some of them are Access based on a network drive and a couple are on a SQL Server.  

I am hoping to start the users out on a SEARCH FORM where they can get to the RESULTS FORM by typing in any number of limiters.  I wrote a quick loop through the text boxes to create the sql statement which works fine on a single database.  Since I have multiple databases would it be fair to do the same for each database and add the matching records to a recordset and then display that recordset in the unbound RESULTS FORM? The user would choose by clicking on the row of which address they want to look and be sent over to the DETAILS FORM that uses subforms for each database based on the street address.


The nearest thing to a common key among the databases is a street address of the property.  Since the addresses may be keyed differently across db's it may be difficult.

Or is there some other way people have found to consolidate several db's onto a single tabbed form with subforms?

I inlcuded a picture of the basic layout so far.
Search.jpg
0
Comment
Question by:zipnotic
  • 2
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
dqmq earned 400 total points
ID: 37735476
My suggestion is to create a local table using a make table query against the first database you are searching.  Then run an append query to the same table against the subsequent databases that you are searching.   After all queries are completed the local table then contains the collective "matches".   The results form can be bound to the local table.

The local table would probably need to include a column or two that identifies the source system/database/table where the row originated.
0
 

Author Comment

by:zipnotic
ID: 37735550
Is there an advantage to creating a local temp table and appending to it rather than creating a recordset in memory and appending to that then displaying the RESULTS FORM ?
0
 
LVL 42

Expert Comment

by:dqmq
ID: 37738786
Two, I can think of:

1. It's a lot simpler.   For example, the append to a table is one set-oriented statement.  The append to a recordset is a procedural loop on the order of 10 statements minimum.  The unbound RESULTS form is similarly an order of magnitude more complex than one that is simply bound to a temp table.

2.  Using persistent storage means the search results survive an Access shutdown--allow you to resume where you left off, so to speak.
0
 

Author Closing Comment

by:zipnotic
ID: 37739067
Much appreciated.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question