JeffW

jeffnos

New member
Local time
Today, 02:59
Joined
Jul 15, 2010
Messages
9
Firstly I would like to comment on such a great site. I have only been playing with Access for about five months I have found some great information from here.
The current problem I have and I can noot find the answer is as follows;
I have a find button on a form witch has a subform on it, I want the find button to search both the form and subform.
At the moment the find is defaulting to where the cursor is positioned.
I would like to be able to Searsh all fields on both the for and subform, with out needing to click out of the subform.
I am using Access 2003 and the subform is a one to many relationship with the form.
Thanks Jeff.
 
At the moment the find is defaulting to where the cursor is positioned...I would like to be able to Searsh all fields on both the for and subform
The behavior you're seeing is the default behavior for Find in Access. Trying to search for a given piece of data, in more than one field, strongly points toward the possibility that you have a major flaw in your database design. Searching for it in all fields, of both the main form and the subform, really takes this beyond the area of possibility into the area of certainty.

Perhaps if you gave us a little more information about your situation, and exactly what you're searching for, we would be better able to assist you.

Linq ;0)>
 
Tnanks for your response, I do not know If I have explained myself correctly. If Iam in the form area I can find data using the find button but not the subform.
If I am in the subform area I can use the fine button to search this area but it will not search the form area.
It fustrating when you want to find data that you must remember to click out of the subform area and onto the form area.
I hope this has explained it a bit better.
Thank
Jeff
 
In the button code, search the form then move the focus to the subform and repeat the Find.

However note the Find is the shotgun method. The FindRecord Method has more finesse.
http://msdn.microsoft.com/en-us/library/aa212410(office.11).aspx

What Linq is alluding to is that searching all fields, especially in both main and subform is usually an indicator of poor data structure. Normally you would be searching a single field because all of the type of data you are looking for would normally be in one field in a well structure database.
 

Users who are viewing this thread

Back
Top Bottom