Results 1 to 4 of 4
  1. #1
    jbethann is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    2

    Using a combo box as search method


    Hi. I am a newbie...to both AccessForums and to Access. I have zero training in Access...just what I have played around with as I create a database for our church library, so please excuse me if I seem kind of Access illiterate. This library database is very functional for myself & my assistant librarian. But I wanted to offer a way for our library patrons to actually look at our catalog (no editing allowed) and browse by a set of predefined subjects, using a combo box for the subjects to choose from. (Much like a Google search.) Our main table is our Catalog table. It has all the details concerning each item in our library. One field is a Subject field, which is a combo box whose data source is SubjectLookUp table containing a list of predefined subjects. I created a navigation form with 2 tabs based on the Catalog table. One tab is named Library Catalog. The other tab is named Subject Search. The library catalog form works great. The Subject Search form is where I am having a problem. I put an unbound combo box in the header of its form with its property control source left blank, row source: SELECT [SubjectLookUp].[Subject] FROM SubjectLookUp ORDER BY [Subject], Row source type Table/Query, Bound Column 1. In the details section of the form, I have a few fields from our catalog table. The combo box will drop down with my subject list, but when you select a subject, it doesn't auto populate the details section of form containing the fields from our catalog table. What am I doing wrong? I would greatly appreciate any help. Thanks!

  2. #2
    Bob McClellan is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    17
    There are multiple ways to attack this...
    one way is to have the underlying recordset of the details form set as a query that references the subject in the form combox.

    if the details table has a column named Subject and if the the rows you want
    returned after selecting a subject in the combo is rows where subject matches what was selected in the combo then....

    Lets say the Form is named frmMain and the comboBox is named cboSubjectSearch.
    The query would be something like...

    Select * from Details where subject = Forms!frmMain.form.cboSubjectSearch.column(0)
    ( or whatever column the subject actually is located )

    then in the AfterUpdate event of the combo, set the
    details subform to requery....

    something like... me.frmDetails.form.requery.

    hth,
    ..bob

  3. #3
    rob109 is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    3
    It looks as if you want to populate unbound text boxes in the detail section of your form with detailed information relating to the Subject the user selects from the Combo Box. If so try including all the information you need for the unbound text boxes in the Select statement for your ComboBox (which I've called cboSubjectSelect), and then the Control Source for the text box will be :- =cboSubjectSelect.Column(1) - increment the .Column(?) depending which column holds the information you need for the particular text box. Bear in mind columns start numbering from 0.

  4. #4
    jbethann is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    2
    Thanks for the help. I tried both methods, but neither worked. I am sure that I am probably not doing something correctly. I found a friend who programs Access and I gave her a copy of my database and she is now working on it. Hopefully she can correct my errors. Thanks again for the advice!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 08-16-2011, 05:54 PM
  2. search as you type in combo box
    By pratim09 in forum Forms
    Replies: 3
    Last Post: 08-05-2011, 07:46 AM
  3. Search using combo boxes
    By jakeao in forum Access
    Replies: 0
    Last Post: 05-18-2011, 12:17 PM
  4. Search Combo box malfunction
    By babak.nourani in forum Forms
    Replies: 7
    Last Post: 01-20-2011, 07:37 PM
  5. Help with a search feature or combo box
    By jmanis in forum Forms
    Replies: 14
    Last Post: 07-06-2010, 06:38 AM

Tags for this Thread

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