Results 1 to 6 of 6
  1. #1
    crobaseball is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    128

    table join; want to see descriptive info with the relationship, not just the ID #

    I have a query which is creating a joined table. The parent is a group category, the child table lists the individual items in it. I'm using an autonumber in the parent as the relationship field, connecting the tables. But I'd really like to be able to see the descriptive information for the group to make sure I'm linking the item information to the correct group. As you can see below, the 1st column is the relationship field.





    And what I'd like to see is the Supplier and Series information. Is there some way to "see" this to make sure I have the correct SeriesID in the above table?



    Thanks!
    Attached Thumbnails Attached Thumbnails Picture2.jpg  

  2. #2
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    What is the SQL of your query? Open the query in design view, then right click and select "SQL View". Copy and paste that text here.

  3. #3
    crobaseball is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    128
    SELECT Lines.SeriesConnectedToLines, Lines.FlatTrimOther, Lines.ShapeCode, Lines.Size, Lines.Descript, Lines.Price, Lines.Freight, [Price]+[Freight] AS Landed, [Landed]*1.75 AS [DLR A], Round([Landed]*1.5,2) AS [DLR B],
    [List]*0.6 AS [WHL A],
    [List]*0.65 AS [WHL B],
    [List]*0.75 AS Retail, Int(100*[DLR A]+0.5)/50 AS List
    FROM [Group] INNER JOIN Lines ON Group.SeriesID = Lines.[SeriesConnectedToLines]
    WHERE (((Group.Series)="Amber Valley") AND ((Lines.FlatTrimOther)="Trim"));

  4. #4
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    You just need to include the fields of the Group table that you want to show.

    Code:
    SELECT Group.Supplier, Group.Series, Lines.SeriesConnectedToLines, Lines.FlatTrimOther, Lines.ShapeCode, Lines.Size, Lines.Descript, Lines.Price, Lines.Freight, [Price]+[Freight] AS Landed, [Landed]*1.75 AS [DLR A], Round([Landed]*1.5,2) AS [DLR B], 
    
    [List]*0.6 AS [WHL A], 
    
    [List]*0.65 AS [WHL B], 
    
    [List]*0.75 AS Retail, Int(100*[DLR A]+0.5)/50 AS List
    FROM [Group] INNER JOIN Lines ON Group.SeriesID = Lines.[SeriesConnectedToLines]
    WHERE (((Group.Series)="Amber Valley") AND ((Lines.FlatTrimOther)="Trim"));
    

  5. #5
    crobaseball is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    128
    Quote Originally Posted by Xipooo View Post
    You just need to include the fields of the Group table that you want to show.

    Code:
    SELECT Group.Supplier, Group.Series, Lines.SeriesConnectedToLines, Lines.FlatTrimOther, Lines.ShapeCode, Lines.Size, Lines.Descript, Lines.Price, Lines.Freight, [Price]+[Freight] AS Landed, [Landed]*1.75 AS [DLR A], Round([Landed]*1.5,2) AS [DLR B], 
    
    [List]*0.6 AS [WHL A], 
    
    [List]*0.65 AS [WHL B], 
    
    [List]*0.75 AS Retail, Int(100*[DLR A]+0.5)/50 AS List
    FROM [Group] INNER JOIN Lines ON Group.SeriesID = Lines.[SeriesConnectedToLines]
    WHERE (((Group.Series)="Amber Valley") AND ((Lines.FlatTrimOther)="Trim"));
    
    I wasn't thinking so much about the query as the actual table. I'm populating the data for the first time. Going forward I can use a form with the fields which you mentioned, though I suppose I can just include that information at the beginning, then delete the field once the database is established. That makes the most sense . . .

  6. #6
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    Why are you making a table at all if you can just use a query?

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

Similar Threads

  1. Replies: 1
    Last Post: 09-03-2013, 07:30 AM
  2. Can I make an Outer Join a one way relationship?
    By johnjmcnaughton in forum Programming
    Replies: 19
    Last Post: 05-01-2013, 09:48 AM
  3. Join Statement with two field relationship
    By dhogan444 in forum Queries
    Replies: 2
    Last Post: 08-09-2012, 08:30 AM
  4. a video descriptive database ?
    By Enora in forum Access
    Replies: 2
    Last Post: 02-10-2011, 08:02 AM
  5. Replies: 3
    Last Post: 01-31-2011, 11:47 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