Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Sydney, New South Wales, Australia
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto Expanding Combos (2003 SP1)

    I have one main form setup with Opening Arguments determining whether private or corporate clients. There is only one Find Record combo box and I've set the Open Args to dynamically set the Row Source as follows:

    "SELECT qryPrivate.CustomerID, Trim$(FirstName) & "" "" & Trim$(LastName) AS Name, Trim(CompanyName) AS Company" _
    & " FROM qryPrivate" _
    & " WHERE (((qryPrivate.CustomerType) = ""Private""))" _
    & " ORDER BY qryPrivate.LastName, qryPrivate.FirstName;"

    The Column Widths are also dynamic but the first column is always 0 cm.

    The problems are:
    1. the Auto Expand feature won't work, that is, if I type a full name such as 'Homer Simpson' into the Find Combo, his name won't appear.
    2. If I type the full name and press Enter, an error appears saying the name cannot be found.

    I am not sure whether this is all because the Row Source is dynamic or two fields are concatenated.

    Any ideas please?
    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Auto Expanding Combos (2003 SP1)

    Has the Bound Column property of the combo box been set to 1?
    Does the code in the After Update event of the combo box use the CustomerID field to look up?

    Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Sydney, New South Wales, Australia
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Expanding Combos (2003 SP1)

    Yes to both of those but I am stuck now because the stripped down version I prepared works perfectly. Any ideas?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Auto Expanding Combos (2003 SP1)

    Try to build up from the stripped down version again by adding removed elements.

Posting Permissions

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