Results 1 to 5 of 5
  1. #1
    dizy8 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2021
    Posts
    20

    Value in Textbox 2 depends on Value on Textbox1

    Hi all,
    I have textbox1 that has a drop down selection of (Station, Tunnel, MEP). Now, I want that when I select “Station”, my textbox2 will have a dropdown select of (Mary, John, Peter) and when I select “Tunnel”, ill have a dropdown select of names (Nina, Ana, Gin) and if I select “MEP” Ill have a drop down selection of names (Apple, love, Faith) only.

    Anyone can help me of the codes please. Do I have to make a table of each set of names?

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    They will be combos, not textboxes, if you have dropdown.
    The method is called Cascading combos.

    This has just been asked in another thread

    Do I have to make a table of each set of names?
    I would just have a table with first combo values in first field and second combo values in a second field in just the one table.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    430
    see Sheet1.
    A and B column has data validation on them.
    sheet "data" holds the valid selection.
    check out the Named range (Ctrl-G, to see) used in Indirect() function.
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    Quote Originally Posted by jojowhite View Post
    see Sheet1.
    A and B column has data validation on them.
    sheet "data" holds the valid selection.
    check out the Named range (Ctrl-G, to see) used in Indirect() function.
    I thought they were talking about an access form?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    430
    ooops, wrong attachment sent.
    here, open Form1.
    suggest you read some ms access programming books to fully understand
    what you are doing.
    Attached Files Attached Files

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

Similar Threads

  1. Textbox2 checks to see if it matches textbox1?
    By tsgtnissen in forum Programming
    Replies: 7
    Last Post: 02-18-2015, 09:47 PM
  2. Replies: 3
    Last Post: 05-30-2014, 12:34 AM
  3. Replies: 19
    Last Post: 02-15-2014, 05:34 PM
  4. Replies: 1
    Last Post: 12-19-2011, 12:16 PM
  5. check textbox1 on each record of report
    By sconard in forum Access
    Replies: 8
    Last Post: 04-13-2011, 12:26 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