Results 1 to 2 of 2
  1. #1
    TToc2u is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    9

    1 query two different tables

    I've been using access for a while, but I've always used the query wizard so i never developed any complicated query’s. I currently have two tables that record different data, but are related and I would like to combine them so that I can display the all data in a report.



    Is it possible to do something like: display all records of table 1 grouped by name, and append data from table2 where the dates match?

    This isn’t actually my database but for an example:
    lets say I have a table that has customer information, name, address ect.
    and I have a second table that has general information that i want to apply to all customers that visited that day. lets say...um... the weather that day. (not necessarily related but just as an example)

    I would then have one from to record customer information(several records per day) and another form to record the weather(once per day).

    could i combine the data into a new table somehow, if they both had = date fields? Something like
    if(table1.date_field)=(table2.date_field) then add table2 field 3-6 to the records on table 1.

    In summary I am trying to avoid having the user input the "weather" information more than once if it is the same for every other record that will be recorded that day.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    No reason to combine into a table.

    Use form/subform arrangement for data entry.

    http://office.microsoft.com/en-us/ac...010098674.aspx

    For output on a report, use a query that joins the tables on common fields. In your example that would be the date.

    http://office.microsoft.com/en-us/ac...005188568.aspx
    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.

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

Similar Threads

  1. Query or Tables
    By finsmith in forum Database Design
    Replies: 1
    Last Post: 12-28-2012, 08:09 AM
  2. Replies: 3
    Last Post: 01-05-2012, 12:04 PM
  3. Trying this query from 2-Tables
    By djclntn in forum Queries
    Replies: 6
    Last Post: 11-13-2011, 09:25 AM
  4. Query on 3 tables
    By aveit in forum Access
    Replies: 0
    Last Post: 04-26-2011, 12:01 PM
  5. Query -2 tables. Help.
    By zuli007 in forum Queries
    Replies: 1
    Last Post: 04-15-2010, 10:02 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