another search question...

action

Registered User.
Local time
Today, 19:21
Joined
May 29, 2003
Messages
89
I have read lots of search related messages but haven't found how to do this..

I want to search on surname, and have all the relevant surnames show with the first names so 1 record can be selected. I can find plenty of ways to find the first surname records but not then the first name.

Each has a seperate field in the table but I want the search form to treat them as one, say surname then first.

Can any body help?

Cheers
 
Concatenate them so they become one field for search purposes. If you're doing a query, use this expression to make them one field:
[FullName]=[Surname]&" "&[FirstName]

Then do your searches on the [FullName].
 
have managed that but...

Have worked out how to do that but if I need to see all the "smiths" for example and then select the correct one how can I display this in another form or subform?

In other words..

I get 30 smiths and need to select one of them called John.

results should look like this:

smith, amber
smith, john
smith, robert
smith, tom
etc

in the subform and then select the correct one wanted

cheers
 
Do you mean that you want to select the Surname from say, a combo box, then be able to select the First name from a list or combo box or something?

Forget the concatenation thing then. Create the combo box and use a query to feed into it all the possible last names from your table. If you want the people with that last name to show up in a subform, create that form and set it's recordsource to be a saved query including a list of fields including Firstname and criteria like this for the Surname field:
[Forms]![YourFormName]![NameofYourComboBox]
 

Users who are viewing this thread

Back
Top Bottom