Search for record

jkfeagle

Codus Confusious
Local time
Today, 16:13
Joined
Aug 22, 2002
Messages
166
Hello all,

Can anyone tell me if there is a way to use the search feature to find a specific record on a form that is based on a query rather than a table? I do not want the form in continuous mode and the way I'm trying to set it up, the user clicks on the field he's going to search and then clicks on a button tied to the search function. This works fine when it is searching a table but not a query. What gives? Thanks for your help.
 
What code are you using to perform the search ?
 
Right now I'm just using the canned search function attached to a button on the form although I am not the least bit hesitant to use code if necessary.
 
The database could potentially have hundreds of records, making a combo box impractical. Any other ideas?
 
A combo box can be made to scroll down as characters are entered, so a few hundred records don't present any problem. But if you don't want to go that way, there's no point in pursuing that line.


I'm not sure what your reference to "canned search function "means. To search a field using the inbuilt search facility, you simply click on the binocular icon whilst the cursor is in the field to be searched. Why doesn't this facility provide the functionality you need? What does your command button actually do? It must have some code behind it. Please go into design view, inspect the code and post it.
 
By canned search function I was referring to the search feature already built in to Microsoft Access. I simply assigned a button to bring up the search screen. Unfortunately the database this refers to is on my home computer so I won't be able to provide a code sample until late today. I would imagine that it would be standard though because I did not write it.
 
I don't know if this has anything to do with it but the form that the search is being done on has subforms although the search is done on fields in the main form. I created a simple dummy form with a query behind it and it works for that so there must be something else going on. Any ideas?
 
No, I was wondering why it wouldn't work with a query, which is why I was interested to see the code. I can't think of an obvious cause for the subforms to play any part if you are searching the parent.
 

Users who are viewing this thread

Back
Top Bottom