Results 1 to 2 of 2
  1. #1
    amit.bhatt is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2013
    Posts
    1

    Question Lookup Value from Another Table but in Main Table Value in 5 other Column



    Name ID 1 ID 2 ID 3 ID 4 ID 5 ID 6 ID 7
    Amit 1020 1050 1030 1080 1090 1075 1065
    AnuJ 1020 1040 1010 1050 1030 1080 1075


    ID Status
    1010 Open
    1030 Open
    1040 Block
    1050 Block
    1080 Block
    1050 Open
    1090 Block
    1075 Open
    1065 Block

    I have large amount of Data so this task only done in ACCESS.

    Above is my Data type of in two Table.


    Result need as below.


    Name ID 1 Status ID 2 Status ID 3 Status ID 4 Status ID 5 Status ID 6 Status ID 7 Status
    Amit 1020 Open 1050 Block 1030 Open 1080 Block 1090 Block 1075 Open 1065 Block
    AnuJ 1020 Open 1040 Block 1010 Open 1050 Block 1030 Open 1080 Block 1075 Open


    I think its very esay for Access master.

    but i dont know please help me...

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    I believe that your first table is not normalized and this will create a big issue to get the results you want. Your first table should probably look like this. Note that the words Name and Value are reserved terms in Access and should not be used as a field name.

    Table1
    ------------
    tName
    ID
    tValue

    In this manner, you can join the tables on the ID field
    Here is a SQL statement that will join the information
    Code:
    SELECT Table1.tName, Table1.ID, Table1.tValue, Table2.Status
    FROM Table1 INNER JOIN Table2 ON Table1.tValue = Table2.ID;
    this presentation is vertical and not horizontal.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-28-2013, 01:59 PM
  2. Replies: 5
    Last Post: 09-21-2012, 11:23 AM
  3. Lookup column based on table value
    By greenkevin86 in forum Access
    Replies: 9
    Last Post: 04-30-2012, 06:03 PM
  4. Replies: 8
    Last Post: 03-22-2012, 08:48 AM
  5. Replies: 2
    Last Post: 08-01-2011, 11:35 PM

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