Results 1 to 5 of 5
  1. #1
    datahead is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Missouri, USA
    Posts
    19

    Row Source Question

    In my split Access (2007) database I have two linked tables "Consumer" and "Consumer Equipment". In the Consumer Equipment table I have a field named "Assignment". Assignment is the field that is linked in a one to many relationship with the Consumer table. When we enter a new item in the Consumer Equipment table there is a combo box that allows us to select from a list of our consumers.



    The row source I used for this was: SELECT Consumer.[Last Name] & "," & " " & Consumer.[First Name], [Consumer].[ID] FROM Consumer ORDER BY [Last Name];

    The bound column is "2" ,the column count is "2" and the column width is 1";1".

    This provides a tidy list of the consumer's last name, first name and then their ID number.

    Now that I have created a SQL database I tried using the row source of: SELECT [dbo_Consumer].[Last Name] & "," & " " [dbo_Consumer].[First Name], [dbo_Consumer].[ID] FROM dbo_Consumer ORDER BY [Last Name];

    Now the Assignment field shows the Consumer ID (primary key) and if I pull the combo box down there is nothing there.

    Obviously I am doing it wrong.....

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,863
    Maybe it is because of this
    ].[Last Name] & "," & " " [dbo_Consumer].[

    And you should have this
    ].[Last Name] & ", " & [dbo_Consumer].[

  3. #3
    datahead is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Missouri, USA
    Posts
    19
    WOOOOOOOT!!!!!!!!!

    That was easy (for someone who knows what they are doing). Thanks much!!!!

    In Access the extra quote with the space (" ") literally adds a space after the comma in the pull down list. I wonder why it just breaks this one?

  4. #4
    datahead is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Missouri, USA
    Posts
    19
    I just noticed I was missing an "&" in the original statement.


    Nothing to see here........

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,863
    Glad things worked out OK.

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

Similar Threads

  1. Replies: 3
    Last Post: 07-24-2014, 01:22 PM
  2. Replies: 1
    Last Post: 11-28-2013, 10:03 PM
  3. Replies: 5
    Last Post: 09-18-2013, 09:15 PM
  4. Replies: 4
    Last Post: 08-25-2012, 07:19 PM
  5. Control Source Data Question
    By walt44 in forum Forms
    Replies: 3
    Last Post: 12-13-2011, 12:56 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 - Senior Forums