Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Search Form Across multiple Access and SQL databases

Posted on 2012-03-18
4
292 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

856 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