Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    jhergert is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2024
    Posts
    21

    Search for Record Form for Main Form

    Hello,

    With a lot of your help I have gotten familiar with combo boxes and having records in them. But my lists are getting quite long and can be time consuming to find the record that i want to select. I was wondering if it is possible to have a some sort of "pop up" form that when I double click (or other option) on the combo box or text box, come up and can search for a record that way. But then have the record selected in the pop up form transfer to the main form.

    I hope I am explaining that well enough.

    Thank you in advance.


    Josh

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Yes that can be done but, unless I misunderstood your suggestion, I can't see any advantage in scrolling through a form rather than a combo to find the desired record.
    You don't ay anything about the records in the combo but, if for example, it contained a list of food items, you could reduce the number of items by having another combo which filters those by categories ie: meat, veg, fruit, fish etc. These are known as "cascading combos".

    Can you tell us more about your db and its purpose an/or post a copy of it.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I have no link for this but you can research FAYT (find as you type) combo boxes. As you type in them, they find the list items that match the entered text. That might be more efficient than filtering from a second form.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Here is one link. I use these classes myself.

    https://www.access-programmers.co.uk...x-form.327863/
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    Join Date
    Apr 2017
    Posts
    1,680
    As much as I have used combos, whenever I enter the displayed selection item's value manually, Access moves in selection list to RowSource row matching with entered value (in case there exists a value starting this way).

    As 1st step, order the combo's row source by column displayed
    So let' assume you want to select in compo box "potatoe". There are 2 ways to do this easily:
    1. You type e.g. "pota" and then activate combo's lookup list - probably it is activated at selection "potatoe", following e.g. with "pottery" etc. No need to scroll through all possible list values from"a" to "z"
    2. You redesign the rowsource of combo so, that displayed values will be like "veg: potatoe". Now when you type into combo "veg", and then activate combo's lookup list, the active item in will be some vegetable, followed by all other vegetables in alphabetical order.

  6. #6
    jhergert is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2024
    Posts
    21
    Thank you for all the help.

    Attached is a sample of my database of what i am working on. In the frmStructureAssembly, in the subform under MaterialID, that is where i am wondering if the popup form idea can be used. Right now there are 500+ records in there and it can take awhile to search through them by scrolling.

    The end goal is to have this database used by other coworkers who may not know exactly the item number for each material. I was thinking of the pop up form with a search box that can make it easier to see and search for those items. Then select it and have it transfer to the main form.

    Thank you again,
    josh
    Attached Files Attached Files

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You would not search by item number, but by name?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #8
    jhergert is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2024
    Posts
    21
    I would like to search by both item number and name

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by jhergert View Post
    I would like to search by both item number and name
    So combine them into one column?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by jhergert View Post
    I would like to search by both item number and name
    perhaps have a combo for each as in the attached db.
    Attached Files Attached Files
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  11. #11
    jhergert is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2024
    Posts
    21
    Bob,

    THANK YOU!!!, that will work and it keeps it simple. I am very new to the access world, trying to help my employer out with putting this together.

    Josh

  12. #12
    jhergert is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2024
    Posts
    21
    What would be the best way to have a keyword search when typing in the description to have the combo box filtered to what you are looking for?

  13. #13
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by jhergert View Post
    Bob,

    THANK YOU!!!, that will work and it keeps it simple. I am very new to the access world, trying to help my employer out with putting this together.

    Josh
    You're welcome. Will also need to sort out tab order and enabled/locked properties of controls. See attached
    Attached Files Attached Files
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  14. #14
    jhergert is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2024
    Posts
    21
    I know it has been little bit. But thank you again everyone for your help.

    I was able to take what you provided and get a pop up to add a record in the subform. I would like to do the same concept but with the main form

    I have had good success with an unbound combo box searchforrecord vba and bringing up that record and showing any items related to it in the subform

    Fast forward to selecting a record in the pop up form to transfer to the unbound combo box. I am running into a wall on how to get the main form to update with the record selected from the pop up form

    Any ideas?

    Thank you josh

  15. #15
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by jhergert View Post
    I know it has been little bit. But thank you again everyone for your help.

    I was able to take what you provided and get a pop up to add a record in the subform. I would like to do the same concept but with the main form

    I have had good success with an unbound combo box searchforrecord vba and bringing up that record and showing any items related to it in the subform

    Fast forward to selecting a record in the pop up form to transfer to the unbound combo box. I am running into a wall on how to get the main form to update with the record selected from the pop up form

    Any ideas?

    Thank you josh
    Can you post a current copy of the db.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 14
    Last Post: 05-26-2019, 05:30 PM
  2. Replies: 4
    Last Post: 09-05-2017, 04:25 AM
  3. Replies: 10
    Last Post: 07-05-2017, 11:31 AM
  4. Search a record in main form
    By sunnyday in forum Database Design
    Replies: 1
    Last Post: 07-03-2015, 12:54 AM
  5. Replies: 13
    Last Post: 01-29-2012, 01:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums