Results 1 to 10 of 10
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Brandon, Manitoba, Canada
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo Box Expansion (Access2000 SR1)

    Two things:
    1. I would like to have a combo box expand as soon as it gets the focus
    without the user clicking the arrow. Anyone know how I can do this?
    2. When using a combo box to look up a customer ID via a phone number field with an input mask (on the form), the auto expand does not work properly. It fills in the entire field when the first character is entered and the cursor moves all the way to the right. How can I get around this? Taking out the input mask works but then the phone number displays without a hyphen.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Combo Box Expansion (Access2000 SR1)

    1. Put something like Combo1.DropDown in the GotFocus event procedure for the Combo1.

    2. I don't understand. Are you using the input mask on a textbox or a combobox? Comboboxes are supposed to fill in with the first match they find, which is why using an input mask on them is such a frustrating thing to try. The simplest way to handle it would probably be to take off the input mask and create a two column in combobox that contains formatted phone numbers and a hidden CustomerID associated with the actual phone number. That way, the user would be entering format and all and finding matches based on the formatted value, but the customerID would simply be the value in the hidden column. No lookup would be required.
    Charlotte

  3. #3
    Star Lounger
    Join Date
    Jan 2001
    Location
    Brandon, Manitoba, Canada
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box Expansion (Access2000 SR1)

    1. Thanks. That works.
    2. I tried to use an input mask in the properties of a combo box, set to look up customerID values (column1) when the user enters a phone number (column2). The phone numbers are otherwise being displayed without the hyphen despite trying to set the format property in the form or the table. They do display fine in the table where an input mask is set. So the I guess the question is how do I format the phone numbers so they will appear correctly. Otherwise my combo is set up the way you describe.

  4. #4
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box Expansion (Access2000 SR1)

    I have attached an example Acc2K database. It contains 1 table (tblCustomers), which contains two fields (CustomerID and PhoneNumber).

    It also contains a form with a combo box and a text box.

    The combobox looks up the tblCustomer table and returns all CustomerID's and their Associated phone numbers formatted to include a hyphen between the 3rd and 4th digits. The CustomerID column is hidden (the column width property of the combo box is set to 0 for the first column).

    The OnChange event takes the CustomerID value select in the combo box (even though the user can't see it) and places it in the textbox txtCustomerID.

    The phone number is formatted in the row source of the combobox (look at the properties of the combobox and click the data tab, then click the elipsis (...) next to the Row Source property to bring up the query builder).

    Hope this helps

    J
    Attached Files Attached Files

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Location
    Brandon, Manitoba, Canada
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box Expansion (Access2000 SR1)

    I don't usually have a problem downloading from this site but this attachment is locking me out. Doesn't even ask for my password.

  6. #6
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box Expansion (Access2000 SR1)

    I've also tried to download and am getting an Access Forbidden error.

    I'll try it again:
    Attached Files Attached Files

  7. #7
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box Expansion (Access2000 SR1)

    I've just tried downloading the above attachment and it seems to work for me, how about give this one a try then <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  8. #8
    Star Lounger
    Join Date
    Jan 2001
    Location
    Brandon, Manitoba, Canada
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box Expansion (Access2000 SR1)

    Downloaded fine this time. To work we go.

  9. #9
    Star Lounger
    Join Date
    Jan 2001
    Location
    Brandon, Manitoba, Canada
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box Expansion (Access2000 SR1)

    I see ... ("said the blind man"). Thanks Jayden!

  10. #10
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box Expansion (Access2000 SR1)

    Glad to help <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

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