Results 1 to 8 of 8
  1. #1
    cameronaziz is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    7

    Row source from table to form

    Im new to access.



    I have a form that has a column with a row source of

    SELECT [SpecimenTable].[ID], [SpecimenTable].[SpecType] FROM SpecimenTable ORDER BY [ID];

    and that works great. It pulls the information and displaces the "spectype" as the choice. When I put that into a form with the same row source, it shows be the ID, not the SpecType as the option.

    A work around I have found is deleting the first part and just having

    SELECT [SpecimenTable].[SpecType] FROM SpecimenTable ORDER BY [ID];

    but then it wont let me actually click on anything. Any advice?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Forms do not have a RowSource, controls do. Are you actually referring to a control and if so, what type of control? ComboBox, List Box, etc.

  3. #3
    cameronaziz is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    7
    I mis spoke the first time. I meant to say:

    I have a table with a combo box with a row source of


    SELECT [SpecimenTable].[ID], [SpecimenTable].[SpecType] FROM SpecimenTable ORDER BY [ID];


    Im trying to have that same combo box on a form.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I hate to break the news but you should start by removing the LookupFields from the tables. http://www.mvps.org/access/lookupfields.htm It is just fine to have ComboBoxes on your forms that do basically the same thing, just not at the table level.

  5. #5
    cameronaziz is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    7
    Thanks!

    So then what is the proper way to do it at the table level?

    That being said, on my form, do you know whats wrong with the row source?

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by cameronaziz View Post
    So then what is the proper way to do it at the table level?
    There is *no* proper way to do this at the table level. It is all done on a form. As for the RowSource of your ComboBox on the form, I see nothing wrong with it. It looks like it should work just fine. Save the RowSource as a query (press the "..." button on that property) and then open the query and see what you get.

  7. #7
    cameronaziz is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    7
    messed with the query builder. got it to work with:

    SELECT SpecimenTable.SpecType, SpecimenTable.ID FROM SpecimenTable ORDER BY SpecimenTable.ID;

    so on my table the proper method would be just to have text data type and nothing else.

    Thanks so much, btw!

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by cameronaziz View Post
    messed with the query builder. got it to work with:

    SELECT SpecimenTable.SpecType, SpecimenTable.ID FROM SpecimenTable ORDER BY SpecimenTable.ID;
    It should have also worked with:
    SELECT SpecType, ID FROM SpecimenTable ORDER BY ID;
    Quote Originally Posted by cameronaziz View Post
    so on my table the proper method would be just to have text data type and nothing else.
    TextBoxes in the Lookup tab, YES. The field can be any type of DataType you want.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-29-2010, 11:16 AM
  2. Form not displaying source table data
    By Sarge, USMC in forum Forms
    Replies: 6
    Last Post: 10-25-2010, 07:36 AM
  3. use a different query/table in row source
    By allenjasonbrown@gmail.com in forum Access
    Replies: 1
    Last Post: 09-16-2010, 12:44 PM
  4. linked table displaying different data than source
    By wil in forum Import/Export Data
    Replies: 1
    Last Post: 08-06-2010, 07:13 AM
  5. Changing the record source in a form
    By lmichaud in forum Forms
    Replies: 1
    Last Post: 07-09-2006, 09:20 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