Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Posts
    3

    Unanswered: Subtable autocomplete/dropdown

    I've been trying to get a subtable combo box to autocomplete; it's a pull-down menu, but I'd like to be able to quickly tab into that box, and start typing, and have Access auto-complete the field from the list of items in the pull-down. Right now, I have to manually click on the "down" arrow, or press F4.

    I've tried the following bit of code that was suggested to me:

    Private Sub CompoundName_KeyPress(KeyAscii As Integer)
    Me.CompoundName.Dropdown
    End Sub

    where CompoundName is the name of the subtable. When I do this, it comes up as an error, with ".Dropdown" highlighted, saying "Compile error: Method or data member not found"

    The "Dropdown" does not appear to be a command that is available to me, despite the fact that it is in the help file, and there's a full entry ("Dropdown Method") in which it is used in the same context.

    Anyway- all I'd like is autocomplete in that subtable field. Any help would be appreciated; I've been trying to get this fixed for days now!

  2. #2
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    The default is *for* this to happen. The combo box *should* autocomplete values that it sees in the recordsource. Check the Data Properties tab for the combo box and ensure the Auto Expand property is set to Yes.
    All code ADO/ADOX unless otherwise specified.
    Mike.

  3. #3
    Join Date
    Dec 2003
    Posts
    3
    Originally posted by HomerBoo
    The default is *for* this to happen. The combo box *should* autocomplete values that it sees in the recordsource. Check the Data Properties tab for the combo box and ensure the Auto Expand property is set to Yes.
    For the List Box: CompoundName I have the following fields in the Data tab under Properties:

    Control Source (CompoundName)
    Row Source Type (Table/Query)
    Row Source (SELECT Compounds.CompoundName FROM Compounds);
    Bound Column (1)
    Default Value (empty)
    Validation Rule (empty)
    Validation Text (empty)
    Enabled (Yes)
    Locked (No)

    I can't find a Auto Expand property anywhere in the properties tab. Am I just clueless?

    If it makes any difference, I'm using Access 2000.

  4. #4
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    Okay, so it's changed from a combo box to a list box, eh?

    Try this link:

    www.rogersaccesslibrary.com/download.asp?
    SampleName='ListBoxTypeIn.mdb'

    Type the whole thing in with no spaces
    All code ADO/ADOX unless otherwise specified.
    Mike.

  5. #5
    Join Date
    Dec 2003
    Posts
    3
    Originally posted by HomerBoo
    Okay, so it's changed from a combo box to a list box, eh?

    Try this link:

    www.rogersaccesslibrary.com/download.asp?
    SampleName='ListBoxTypeIn.mdb'

    Type the whole thing in with no spaces
    Darn. My terminology is off- yes, it IS a list box.

    I think I found an easier way; I switched it to a combo box, and it seemed to work fine. Hmm.

    Thanks!
    Last edited by captan; 12-17-03 at 15:17.

Posting Permissions

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