|  | Command Button in sub forms |  | |
| | | Nan |  |
| Posted: Sun Aug 24, 2008 8:16 pm Post subject: Command Button in sub forms |  |
Is it possible to apply a find command button for an entire report (inclusive of sub forms)? The find command button I have created only finds results based on the main form, regarless of where I place the cursor, i.e., in a field within a sub form. It's search results does not find a word or character I am searching, that I know exists. Any help?
Thanks!! |
| |
| | | Allen Browne |  |
| Posted: Mon Aug 25, 2008 12:48 am Post subject: Re: Command Button in sub forms |  |
| |  | |
I'm not really clear here, but I think you have a main form (not report?), with a subform. The subform shows only the records that match the record in the main form. You can search the subform, but it will search only the records that are already in the subform.
If that's what you are trying to do, see: Filter a Form on a Field in a Subform at: LINK
-- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - LINK Reply to group, rather than allenbrowne at mvps dot org.
"Nan" <Nan@discussions.microsoft.com> wrote in message news:62EAED44-7200-405F-93AE-29E9F2743017@microsoft.com...
| Quote: | Is it possible to apply a find command button for an entire report (inclusive of sub forms)? The find command button I have created only finds results based on the main form, regarless of where I place the cursor, i.e., in a field within a sub form. It's search results does not find a word or character I am searching, that I know exists. Any help? |
|
| |
| | | Nan |  |
| Posted: Mon Aug 25, 2008 2:08 pm Post subject: Re: Command Button in sub forms |  |
| |  | |
Hi Allen,
First, Thank you.
My apologies... it is a form with sub form(s). I created a find command, but when I ask it to search for a field in any of the sub form(s) it returns a response that no matches are found. When using the same command in the main form it does locate the record... it doesn't seem to be working in the sub-forms??? Hope this helps.
"Allen Browne" wrote:
| Quote: | I'm not really clear here, but I think you have a main form (not report?), with a subform. The subform shows only the records that match the record in the main form. You can search the subform, but it will search only the records that are already in the subform.
If that's what you are trying to do, see: Filter a Form on a Field in a Subform at: LINK
-- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - LINK Reply to group, rather than allenbrowne at mvps dot org.
"Nan" <Nan@discussions.microsoft.com> wrote in message news:62EAED44-7200-405F-93AE-29E9F2743017@microsoft.com... Is it possible to apply a find command button for an entire report (inclusive of sub forms)? The find command button I have created only finds results based on the main form, regarless of where I place the cursor, i.e., in a field within a sub form. It's search results does not find a word or character I am searching, that I know exists. Any help?
|
|
| |
| | | Allen Browne |  |
| Posted: Mon Aug 25, 2008 11:59 pm Post subject: Re: Command Button in sub forms |  |
| |  | |
My question is: - Is the record there in the subform to find? - Or do you have to move to a different record in the main form before the record will be there in the subform to find?
-- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - LINK Reply to group, rather than allenbrowne at mvps dot org.
"Nan" <Nan@discussions.microsoft.com> wrote in message news:09EEC78B-14CB-4A09-96E9-2114B546BC72@microsoft.com...
| Quote: | Hi Allen,
First, Thank you.
My apologies... it is a form with sub form(s). I created a find command, but when I ask it to search for a field in any of the sub form(s) it returns a response that no matches are found. When using the same command in the main form it does locate the record... it doesn't seem to be working in the sub-forms??? Hope this helps.
"Allen Browne" wrote:
I'm not really clear here, but I think you have a main form (not report?), with a subform. The subform shows only the records that match the record in the main form. You can search the subform, but it will search only the records that are already in the subform.
If that's what you are trying to do, see: Filter a Form on a Field in a Subform at: LINK
"Nan" <Nan@discussions.microsoft.com> wrote in message news:62EAED44-7200-405F-93AE-29E9F2743017@microsoft.com... Is it possible to apply a find command button for an entire report (inclusive of sub forms)? The find command button I have created only finds resultsbased on the main form, regarless of where I place the cursor, i.e., in afield within a sub form. It's search results does not find a word or character I am searching, that I know exists. Any help? |
|
| |
| | | Nan |  |
| Posted: Tue Aug 26, 2008 4:53 pm Post subject: Re: Command Button in sub forms |  |
| |  | |
Your question is interesting.
Answer 1 to your question 1: Yes, and it still does not find it. Answer 2 to Q 2: Regardless of the record I move to, it does not find any known records in the sub forms.
The search only seems to work on the main form, and only the fields within the main form.
"Allen Browne" wrote:
| Quote: | My question is: - Is the record there in the subform to find? - Or do you have to move to a different record in the main form before the record will be there in the subform to find?
-- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - LINK Reply to group, rather than allenbrowne at mvps dot org.
"Nan" <Nan@discussions.microsoft.com> wrote in message news:09EEC78B-14CB-4A09-96E9-2114B546BC72@microsoft.com... Hi Allen,
First, Thank you.
My apologies... it is a form with sub form(s). I created a find command, but when I ask it to search for a field in any of the sub form(s) it returns a response that no matches are found. When using the same command in the main form it does locate the record... it doesn't seem to be working in the sub-forms??? Hope this helps.
"Allen Browne" wrote:
I'm not really clear here, but I think you have a main form (not report?), with a subform. The subform shows only the records that match the record in the main form. You can search the subform, but it will search only the records that are already in the subform.
If that's what you are trying to do, see: Filter a Form on a Field in a Subform at: LINK
"Nan" <Nan@discussions.microsoft.com> wrote in message news:62EAED44-7200-405F-93AE-29E9F2743017@microsoft.com... Is it possible to apply a find command button for an entire report (inclusive of sub forms)? The find command button I have created only finds resultsbased on the main form, regarless of where I place the cursor, i.e., in afield within a sub form. It's search results does not find a word or character I am searching, that I know exists. Any help?
|
|
| |
| | | Allen Browne |  |
| Posted: Wed Aug 27, 2008 12:13 am Post subject: Re: Command Button in sub forms |  |
| |  | |
You should be able to put the cursor in any text box in the subform, and use the Find button on the toolbar to find records in the subform, provided they are already loaded there.
If you want to write your own code to do this, use the RecordsetClone of the form in the subform. FindFirst. Test NoMatch. Set Bookmark.
-- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - LINK Reply to group, rather than allenbrowne at mvps dot org.
"Nan" <Nan@discussions.microsoft.com> wrote in message news:A722673E-2DFF-482B-BEBC-2E1D52C55E39@microsoft.com...
| Quote: | Your question is interesting.
Answer 1 to your question 1: Yes, and it still does not find it. Answer 2 to Q 2: Regardless of the record I move to, it does not find any known records in the sub forms.
The search only seems to work on the main form, and only the fields within the main form.
"Allen Browne" wrote:
My question is: - Is the record there in the subform to find? - Or do you have to move to a different record in the main form before the record will be there in the subform to find? |
|
| |
|
|