Page 1 of 3 123 LastLast
Results 1 to 15 of 39
  1. #1
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48

    Auto Populate TextBox when choosing from ComboBox.

    I have a sub-form that uses a table to populate a combo-box on the form.
    The table has two fields and an auto number (ID) field.

    So the Table has: Operation_ID (primary key & auto number)
    Operation_Description (Short Text)
    Operation_Numbers (Short Text)

    The form works good as I choose from the combo-box but I would like to populate the textbox from the same table when I choose from the combo-box.
    The item in the combo-box is related to the item that I want to see in the textbox.
    Example: I choose Heat Treat from the combo-box which is ID #3 in the table.


    The text box should display the "HT" from the same ID #3

    I am sure it is a simple fix but I have been at it for a couple days now

    Click image for larger version. 

Name:	OperationSubform (2).jpg 
Views:	34 
Size:	64.8 KB 
ID:	28445

    Here is my small DB as well

    ProcessSheets4-27-17.zip

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Does this help?

    BaldyWeb - Autofill
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    Sorry pbaldy...that did not work.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    "did not work" is very vague. I can assure you it does work. What exactly did you try?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    LOL sorry about being vague
    =[Operation_ID].[ColumnCount](2)
    this is what I used
    I did not try the other code yet
    But I do not have two tables that I am getting info from or maybe I read your instructions wrong.

  6. #6
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    this is the code for my combo box
    SELECT OperationsT.Operation_Description, OperationsT.Operation_Numbers FROM OperationsT;

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    As noted in the link, the Column property is zero based, so you'd want 1 for the second column.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    I hate to be vague again but
    =[Operation_ID].[ColumnCount](1)
    Did not work either - I get #error in the text box

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    It's Column, not ColumnCount.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    Thank You
    That did the trick.
    Sorry to trouble you.
    Problem solved
    I'll read more closely next time.

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help. You had it in post 5 too, I should have noticed it then. Saw the 2 and stopped looking.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    How do I put solved on the thread?

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    It's in Thread Tools at the top of the thread.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    thanks again

  15. #15
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    Sorry to bother you again.
    The sub form I was using was supposed to update a table I am using for a query.
    Do I need to do something else to update the table?

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. auto populate textbox
    By willfrank in forum Access
    Replies: 1
    Last Post: 04-13-2016, 09:53 AM
  2. Auto Populate fields with ComboBox
    By warmanlord in forum Access
    Replies: 3
    Last Post: 10-02-2015, 08:59 AM
  3. Auto Populate TextBox
    By Shido151 in forum Access
    Replies: 3
    Last Post: 04-23-2013, 10:41 AM
  4. Replies: 1
    Last Post: 02-04-2013, 09:48 AM
  5. Replies: 1
    Last Post: 01-16-2013, 03:32 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