Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search by name form

Status
Not open for further replies.

officemanager2

Technical User
Oct 11, 2007
116
CA
Hello: I'm trying to put together a search by name form (namefind) using a combo box. I've got to the point where the combo box uses a query to search the names, but I can't seem to get it so that when a name is selected (double clicked) the form (Mailing List) with the contact info on it opens up.

From what I've been able to understand I need to set the filter on the (Mailing List) form (this is the form with the contact info on it) to something like this

namefindQ!First Name=form!namefind.FNsearch

namefindQ is the query
First Name is the field that is being searched
namefind is the form with the combobox
FNsearch is the combo box

In the combo box I have the event dblclick set to the following

[FNsearch]=Forms![Mailing List]!namefind!FNsearch

It seems this is close to what I would like to do, but is falling short.

thanks

 
Why not using the 4th parameter of the DoCmd.OpenForm method ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PHV: By fourth parameter do you mean the 'FNsearch' which is the combobox ?

[FNsearch]=Forms![Mailing List]!namefind!FNsearch

At this point I'm making the filters for the mainform (Mailing List) and the search form (findname) are the same. It seems the issue may be how I've set up the event.

I'm going to keep plugging away till I get this thing working because I know it is possible. If you have a chance please expand on your input and I'll do my best to implement it.

thanks
 
I think the Do.Cmd won't work because the idea is to open the specific record that has been searched using the combobox and query. This what I've read so far, but the implementation is of course more difficult for me.

I've changed the filter line as well to read as follows

[First Name] = [namefind]![namefindQ]![ID]

which translates to

[field] = [form]![query]![bound search box]

I'm hopping I have the bound box set up correctly because I still cannot get the information form to open from the search form.
 
I had a look at it, but given my stumbling right now I don't think I can implement that code into what I have. I may try and start this thing over from scratch though so I'll book mark that and see what happens next.

thanks though
 
How is opened the (Mailing List) form opened ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That's what I'm trying to figure out right now. I was under the impression that one is to set the Mailing List form filter to match the search form filter.

I have been trying to set it up so that once the end user does the search, finds who they are looking for they click (or double click) and that should open the Mailing List form.

But I cannot get the code right. I've tried using the expression builder as well as using VBA but nothing is working.

Any suggestions are appreciated.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top