From: Srenfro on
Hello I am trying to creat a search option in my database where when I want
to find customers by city all i have to do is type in the city in the text
box and search and all the results show up in the bottom datasheet subform so
far i have the text box and the subform and all the records but when i try to
do a search it acts like i hit tab and just goes to the record right under or
next to the record and it also show all my records not the ones i was trying
to search. is there a way i can get this text box to search and only bring
the results i want to show up in the subform thank you in advance
From: KARL DEWEY on
>>i have the text box and the subform and all the records
I would use a combo to select city rather than typing (fumble fingers
typing) to be used as criteria in a query. Have event requery after
selection.

--
Build a little, test a little.


"Srenfro" wrote:

> Hello I am trying to creat a search option in my database where when I want
> to find customers by city all i have to do is type in the city in the text
> box and search and all the results show up in the bottom datasheet subform so
> far i have the text box and the subform and all the records but when i try to
> do a search it acts like i hit tab and just goes to the record right under or
> next to the record and it also show all my records not the ones i was trying
> to search. is there a way i can get this text box to search and only bring
> the results i want to show up in the subform thank you in advance
From: Srenfro on
I have tryed that to but I get the same results thats why i thought a text
box would be the object to use. I tryed to use the find as you type idea and
it just erases and rewrites the current record am i missing something mabey?
I will try again though and let you know what happens thanks
"KARL DEWEY" wrotie:

> >>i have the text box and the subform and all the records
> I would use a combo to select city rather than typing (fumble fingers
> typing) to be used as criteria in a query. Have event requery after
> selection.
>
> --
> Build a little, test a little.
>
>
> "Srenfro" wrote:
>
> > Hello I am trying to creat a search option in my database where when I want
> > to find customers by city all i have to do is type in the city in the text
> > box and search and all the results show up in the bottom datasheet subform so
> > far i have the text box and the subform and all the records but when i try to
> > do a search it acts like i hit tab and just goes to the record right under or
> > next to the record and it also show all my records not the ones i was trying
> > to search. is there a way i can get this text box to search and only bring
> > the results i want to show up in the subform thank you in advance
From: KARL DEWEY on
>>it just erases and rewrites the current record am i missing something mabey?
Somehow you misinterpreted what I proposed.

Use a combo in the form header to select your city from the city table or
totals query from your data table to provide a list of existing cities to
pick from.

Then have a subform fed by a query that uses the combo box as criteria on
the city field. In query design view put this in the Criteria row under the
city field, substituting your form and field names --
[Forms]![YourFormName]![ComboName]

Then use an event of the combo OnChange to requery.

Doing this will not erase any data.

--
Build a little, test a little.


"Srenfro" wrote:

> I have tryed that to but I get the same results thats why i thought a text
> box would be the object to use. I tryed to use the find as you type idea and
> it just erases and rewrites the current record am i missing something mabey?
> I will try again though and let you know what happens thanks
> "KARL DEWEY" wrotie:
>
> > >>i have the text box and the subform and all the records
> > I would use a combo to select city rather than typing (fumble fingers
> > typing) to be used as criteria in a query. Have event requery after
> > selection.
> >
> > --
> > Build a little, test a little.
> >
> >
> > "Srenfro" wrote:
> >
> > > Hello I am trying to creat a search option in my database where when I want
> > > to find customers by city all i have to do is type in the city in the text
> > > box and search and all the results show up in the bottom datasheet subform so
> > > far i have the text box and the subform and all the records but when i try to
> > > do a search it acts like i hit tab and just goes to the record right under or
> > > next to the record and it also show all my records not the ones i was trying
> > > to search. is there a way i can get this text box to search and only bring
> > > the results i want to show up in the subform thank you in advance