Ask Experts Questions for FREE Help !
Ask
    Stuartjacks's Avatar
    Stuartjacks Posts: 3, Reputation: 1
    New Member
     
    #1

    Jul 25, 2010, 09:45 AM
    Search for record with combo box
    I have a combo box on a form that shows Surname and first Name fields in 2 columns.
    in my after update I have the following

    DoCmd.ShowAllRecords
    Me!Surname.SetFocus
    DoCmd.FindRecord Me!CboFindSurname
    'Set value of combo box equal to an empty string
    Me!CboFindSurname.Value = ""

    This works fine until I have more than one Identical surname then this only shows the record with the first ID number despite selecting a different Surname & First Name combination in the combo box.

    My query has ID (not shown), Surname (Ascending & Visible) and First name (ascending & Visible) - all drawn from the sme table if this helps at all

    I be grateful for any help anyone might be able to give as I've only just started on access and my abilities are very limited. - THANKS!
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Aug 6, 2010, 09:23 AM
    Use the Combobox wizard to create a search combo. You will need to edit the RowSource and to show both Surname and firstname. For people searches I use a RowSource like:

    SELECT PersonID, Surname & ", " & Firstname As Fullname
    FROM tablename
    ORDEr BY Surname, Firstname;

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Record from TV, dvd/vcr combo (without digital tuner) and converter box [ 1 Answers ]

Will it be possible to record from a television, no cable, connected to a dvd/vcr combo (both without digital tuners) and connected to a converter box; and how do I connect? What do I need/ :confused:

Mulitple Combo Box [ 3 Answers ]

I have seen before in a database a certain combo box. I am using MS Access 2000 and Visual Basic. This combo box had 5 choices, all these choices had a control source to a field called Initiatves; so when a user clicked a choice it was a new record in the initiative field in the tblMain. The...

Combo box/list box/drop down box [ 1 Answers ]

I have a question for you in regards to a list box in a query. I have a form that I am using and want to give the users some options on what years they want to pull data from. So I was thinking about creating a list box or drop down box that would display the available years, when they highlighted...

Combo box script [ 2 Answers ]

I was wondering if anyone has or knows where I could get a script for combo boxes that alows me to go about 6 levels in but select earlier if needed and also boxes only appears if previous box has been used.


View more questions Search