Results 1 to 11 of 11
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Combo box find (Access 97/2002)

    I have a form where one of the combo boxes cannot be used by the find. It can if I put the code rather than the name.
    The combo box holds the ID of the Contact name, so when I try to use the binoculars on the form I cannot find the name I keyin, it's obviously looking for the ID.
    The combo box has 2 fields in it's source, the ID which is invisible and the name which is visible, it is bound to a field in the form's recordsource.

    If I have not been clear enough please let me know.

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

    Re: Combo box find (Access 97/2002)

    Does it help if you tick the "Search Fields as Formatted" check box in the Find dialog?

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Combo box find (Access 97/2002)

    No, I have tried quite a few combinations/permutations of the find box and no glory.
    I believe that my problem is that in the table this field is defined as a long integer, this links to a table with an autonumber field as it's PK. The combo box has it's first field as the PK field (it's length is zero so it's invisible) with the name as the first visible field.
    If I do a find on the number it finds it ok, however users know the field by people names and not their autonumbers.

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

    Re: Combo box find (Access 97/2002)

    I use this kind of setup all the time; if I tick "Search fields as formatted", I can search for names.

    Could you post ...? (you're familiar with the routine) <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Combo box find (Access 97/2002)

    Hi Hans
    I have included the DB. The combo box I'm talking about is the Primary Contact.
    Attached Files Attached Files

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

    Re: Combo box find (Access 97/2002)

    Pat,

    I cannot say that I understand it completely, but it must be something like this: The combo box restricts the names displayed to those belonging to the current Customer Profile. Other names are simply not available. So if you had another record for the same Customer Profile, but with a different Primary Contact, you would be able to search for it by name. But you can't find Primary contacts for other Customer Profiles by name.

    If you put another combo box on the form that returns the (unique) names of all Primary Contacts, you'll be able to search for all of them by name if "search fields as formatted" is on.

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Combo box find (Access 97/2002)

    Sorry I didn't explain it in more detail. You certainly do understand it.

    What is the reason I cannot find the Primary Contact by name? Is it the combo box restriciting it to the current Customer Profile?

    Even if I had the same Customer Profile for several Proforma Invoices, are you saying I can search for them by Primary Contact name.

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

    Re: Combo box find (Access 97/2002)

    Yes, the combo box is restricted to the current customer profile by its row source. Say that you have 5 records for customer profile "Mr & Mrs 1", with different primary contacts, and 4 for customer profile "Name 2", also with different primary contacts.

    If the current record is for "Mr and Mrs 1", you will be able to search for the other primary contacts of this customer profile by name, but for the primary contacts of "Name 2" only by their numeric ID.
    If the current record is for "Name 2", it will be the other way round.

  9. #9
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Combo box find (Access 97/2002)

    On further investigation it has dawned on me that I need an extra combo box to search for the Proforma Invoice by Primary Contact name.

    I have done this before, I just got a mental block.
    Thanks for your help.

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

    Re: Combo box find (Access 97/2002)

    <img src=/S/yep.gif border=0 alt=yep width=15 height=15> That's what I suggested in <post#=342961>post 342961</post#>.

  11. #11
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Combo box find (Access 97/2002)

    Yes I did notice that, thank you.

Posting Permissions

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