Results 1 to 3 of 3
  1. #1
    trident is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    141

    Combine data from another table using query expression


    I have several table connected to the Main table. In the main table, only the ID no is save from the other tables to save space. Now in the query I am creating I am trying to get the data in the other table.

    sample is:

    Main Table: connection Sample

    Company ----- CoID, CoName 1 WSD
    Section ------- SctnID, SctnName 2 HelpDesk
    Year ------------ No connection 15
    Reference No -- No Connection 20003

    I am trying to create an expression wherein the CoName and SctnName from the other tables will appear instead of the CoID/SctnID which is saved in the main table:

    Company-Section-Year-Reference No

    This is my expression:

    [MainTable].[Company] &"-"& [Maintable].[Section] &"-"& [MainTable].[Year] &"-"& [MainTable].[Reference No]

    The result is: 1-2-15-20003

    but what I need is

    WSD-HelpDesk-15-20003

    Can you please assist me on this.

    Thank you.

    Trident

  2. #2
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    What you need is:
    [CompaniesTable].[CoName] &"-"& [SectionsTable].[SctnName] &"-"& [MainTable].[Year] &"-"& [MainTable].[Reference No]

  3. #3
    trident is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    141
    Thanks Cyanidem, it works.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-21-2015, 02:25 PM
  2. Combine data from one table
    By Ray67 in forum Queries
    Replies: 19
    Last Post: 08-04-2014, 07:12 AM
  3. Combine Crosstab query with Table to export together to Excel
    By kattatonic1 in forum Database Design
    Replies: 3
    Last Post: 04-04-2014, 10:56 AM
  4. Getting Expression-Relayed Data to Table
    By homerj56 in forum Programming
    Replies: 4
    Last Post: 09-10-2010, 08:56 AM
  5. Combine Query Results to One Table
    By pr4t3ek in forum Queries
    Replies: 0
    Last Post: 12-19-2008, 06:37 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