Results 1 to 14 of 14
  1. #1
    Join Date
    Nov 2008
    Location
    Cardiff
    Posts
    47

    Unanswered: Filtering information from a Table into a Text Box in a Form

    Hi Everyone,

    I'm hoping this is the final part of my quest - thankyou to everyone who has helped so far, its an excellent forum for advice...

    I have a form, within in this form I've created 3 Combo Text boxes displaying different information.
    I've also created a table seperate from this form (still within the same database), with 3 seperate columns of information.

    How can allow the 3 Combo text boxes within the form to display in the drop down the information from the table, for example:


    Form1:

    Text Combo Box 1 Text Combo Box 2 Text Combo Box 3


    Table 1:

    Cust Support Name Cust Support Contact Details Cust Support Info

    Joe Bloggs 1 ******************** ************
    Joe Bloggs 2 ******************** ************
    Joe Bloggs 3 ******************** ************

    How do I get Form 1-Combo Box 1 to display in the drop down all of the contents in Table 1-Cust Support Name. Giving me the choice to choose the relevant field...
    I assume I've got to link these some how but not sure of the best way to do this

    Any help would be appreciated - Many thanks...

  2. #2
    Join Date
    Feb 2004
    Posts
    214

    ...

    Not 100% of what you are wanting to accomplish

    A) to populate the combo box with the entire contents of one of your tables
    B) to populate the combo box only with the info relevant to some other field or combo box on your form
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Both of which are answered by setting the Row Source and Column Count properties of the combo box accordingly, but yes, it's not clear what you are asking.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Nov 2008
    Location
    Cardiff
    Posts
    47
    Hi Guys,

    Its to populate the each of the three Combo Boxes with the contents of each column of the table.

    ie: In the first Combo Box, I'm wanting to populate contents from the first column of the table.
    In the second Combo box, I'm wanting to populate contents from the second column of the table.
    In the third Combo box, I'm wanting to populate contents from the third column of the table.

    This way each Combo box has seperate information still from the same table...

    Thanks

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    but if they are coming from the same table why woudl you have 3 spearte listboxes?
    sounds like a flaky UI design or table design, or mebbe you just haven't explained the requirement

    is what you mean you want to have more than one column displayed in a combo/list box

    failing that it sounds to me as if you want to pull the values for the listboxes from 3 separate tables to select appropriate values for the single customer records
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Nov 2008
    Location
    Cardiff
    Posts
    47
    Hi Healdem,

    Thanks for your reply....

    The table consists of three columns, each column containing seperate information. Each Seperate Combo-Box in the drop down must only be able to see the contents of any one column from the table.

    Form: Table:

    Combo-Box 1: >> can only see the contents from >> Column 1
    Combo-Box 2: >> can only see the contents from >> Column 2
    Combo-Box 3: >> can only see the contents from >> Column 3

    Thanks

  7. #7
    Join Date
    Nov 2008
    Location
    Cardiff
    Posts
    47
    Sorry trying to make it as clear as I can:

    I'm trying to populate the combo box only with the info from a column of a table, not the whole table...

    (FormA) Combo-Box 1: >> can only see the contents from >> Column 1
    (FormA) Combo-Box 2: >> can only see the contents from >> Column 2 (FormA) Combo-Box 3: >> can only see the contents from >> Column 3

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I get it.

    You want to have each combo box have a unique list of choices in it which all come from entries in the table already. So the user can choose from existing entries rather than having to type the same stuff in again.

    It points to bad design in the tables (tables not normalised), which is what I think is making it hard to understand, but you can do this by setting the Row Source of the combo box to something like SELECT DISTINCT FieldName FROM YourTableName ORDER BY FieldName;
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    Nov 2008
    Location
    Cardiff
    Posts
    47
    Hi StarTrekker,

    Exactly, you've hit the nail on the head my friend, any idea's on the best way to do this?

    Thanks again for your reply...

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Try what I said in post 8

    Go to Design View, click your combo box, open properties, find Row Source and use the example SQL statement I gave you. Just substitute FieldName for your field name and YourTableName for the name of your table.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  11. #11
    Join Date
    Nov 2008
    Location
    Cardiff
    Posts
    47
    Sorry StarTrekker, I missed your solution at that the bottom of the last comment... My apologies

  12. #12
    Join Date
    Nov 2008
    Location
    Cardiff
    Posts
    47
    Thanks again :-)

  13. #13
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You're welcome
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  14. #14
    Join Date
    Nov 2008
    Location
    Cardiff
    Posts
    47
    Is there any possibly way to select the content in one column and the other two columns to display the other fields automatically?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •