Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2011
    Posts
    3

    Unanswered: search multiple fields w/ combobox?

    hello,

    thanks in advance for your help as i am new to your forum.

    i am using access 2010 and am trying to create a combobox that always the input of 2 different fields and returns or is bound to just one of them

    heres the idea

    i have an invoice form
    we track our product by our own internal SKU system and UPC of the product
    sometimes you have one or the other - what i want to do is allow the user to enter the upc or the sku and the combo box in the end to just display the sku

    the upc and sku are both in the same table

  2. #2
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    Something like "SELECT DISTINCT SKU, UPC FROM tblUPCSKU ORDER BY SKU;"?
    It would require them to scroll down to select the appropriate UPC, or allow them to type in the SKU. When a value is selected the SKU will be the shown column of the combo.

    If you need to allow them to type in either value, then I would go with either 2 comboboxes or a text box and search from that using the On_Exit event of the text box, for searching from a combobox I typically use the _AfterUpdate event.

    Sam, hth
    Good, fast, cheap...Pick 2.

  3. #3
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    I think a more conventional approach would be to have a SKU combo box and a button for SKU lookup by UPC. You can create a separate form that acts like a dialog and returns the SKU the user found with the UPC lookup.

  4. #4
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    LoL Bah! You had to take all the fun out of things<g>

    To be honest, I didn't even think about creating a secondary search form, my current users consider that "way too much effort" to actually have to type things (I think they're expecting a telepathic link with the database) into a second form, so I've been reduced to using that search in the _OnExit event quite a bit (the results can be quite entertaining when they tab/click away from the box too soon by accident).

    At any rate, after my rambling, I would second DCKunkle's advice.

    Sam, 79 hour week last week...5 states...my brain is pudding this week
    Good, fast, cheap...Pick 2.

  5. #5
    Join Date
    Jan 2011
    Posts
    3
    thanks for the info - i have to say though the people using are the type to complain to click an extra button - so even though it may work better - i will most likey use the on exit command

Posting Permissions

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