Results 1 to 3 of 3
  1. #1
    IncidentalProgrammer is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2014
    Location
    Texas
    Posts
    156

    Making a text box that takes data from two different (but similar) tables.


    The database I'm creating at work will be storing data on insurance claims, among other things. There are two different tables for claims, due to the different ways the data will be received. In the near future, another system will be complete that will be able to send me reports to import that will have all the claim data for claims going forward; that will go into and continually overwrite a table I've designed for imported claims (each claim in the new report will overwrite its existing entry upon importing, so as to update). The second table is for older claims that we will have to input manually; since old claims won't be on the new system and included in the update reports, I wanted to keep these separate so that they don't get erased when I import. (I have never imported data into a database before, so am I thinking of this wrong?)

    I'm working now on a search form for users to look up all claims from both tables. I'm using the Allen Browne method, so it's a series of text boxes. The problem though is getting each text box to access the values from both tables (the claim number box needs to look for claim numbers in the import table and manual table, for example). I've tried writing an expression, but I'm getting an error. Is this possible?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    The form RecordSource can be a UNION query.

    Example:

    SELECT field1, field2, field3, "import" AS Source FROM [import table]
    UN ION SELECT field1, field2, field3 "manual" FROM [manual table];

    There is no wizard or builder for UNION query, must type into SQL View of query designer.

    Data is not editable through UNION query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    IncidentalProgrammer is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2014
    Location
    Texas
    Posts
    156
    I hadn't heard of Union Queries! I'm going to try that right now. Thanks, June7!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Find similar names in two tables
    By Ruegen in forum Queries
    Replies: 1
    Last Post: 08-17-2014, 07:25 PM
  2. Replies: 2
    Last Post: 05-27-2013, 09:25 AM
  3. Relating Multipe Tables With Similar Data To A Master Table
    By TotalChaos in forum Database Design
    Replies: 1
    Last Post: 04-13-2013, 12:57 AM
  4. Replies: 5
    Last Post: 08-05-2011, 12:33 PM
  5. Replies: 9
    Last Post: 10-09-2009, 08:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums