I would like the qurey to run every time i type in a new letter.
for example if i have the following names in the databse
Alex
Andy
Caroline
Catherine
Chris
Dan
the the above name are displayed in a continuous form but when i type
'C' into the search box it requerys and displays
Caroline
Catherine
Chris
then i would be able to type another letter in the search box 'Ca' into
the search box it requerys and displays
Caroline
Catherine
hen i would be able to type another letter in the search box 'Car' into
the search box it requerys and displays
Caroline
There for the the only person in the databse with 'Car' in there name
is Caroline
There for i would like to be able to type in a letter then it requersy
.. I do not want to type in the name then when i leave the box it querys
it
Can some one help
thanks very much
Simon,
Instead of putting the requery on the On Change event, put it on the After
Update event. That way, the requery will not run until you leave that field.
I would image you would not need to return to that field again when you
switch the code to the After Update but if by some chance you do, put the
following on the After Update
DoCmd.Requery
DoCmd.GotoControl "FirstNameSearch"
Hope this helps
Jackie
Simon said:
I have my seach working fine now, I would it to every time i type in a
letter of a name it will requery and dispaly the best matches
I currently have the following code on the fied that i type in the
First name i would like to seach for
Private Sub FirstNameSearch_Change()
DoCmd.Requery
End Sub
the only problem is every time i type in the first letter i requrys it
but then it set the cursorto a differnet field therfor i can not carry
on typing in the name
is there a way to make sure it leaves the cursorin the same place after
i requry
Use a "wildcard" in your criteria field
Like &"*"&[Forms]![DataEntryForm]![FieldOnForm]&"*"
Is there a way if i just type in 'Smi' it will find any names similare
to it like 'Smith'
You could create a query to use the three fields on your form as criteria,
base your form off the query and then either on a button or on the After
Update event of your fields, put:
DoCmd.Requery
:
I have a form that displays lots of data
I would like a text box at the top of the form that when i type in some
data it will filter every thing on that form if it contains when i type
in the box.
I will want it to search for it in 3 different fields if poss
Simon- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -