Connecting Tech Pros Worldwide Forums | Help | Site Map

Create Form-Subform to Perform Searches

ghat12@gmail.com
Guest
 
Posts: n/a
#1: Feb 22 '06
Hi,

I have created a form containing 5 textfields/combo boxes and a command
button to conduct searches for matching records. My results are
currently displayed as a separate datasheet which is launched by
specifying the query in the OnClick property of the command button.

I would like to create a form that displays the results in a datasheet
on the bottom portion of the same form. I understand that this requires
using the form-subform framework but don't know how to create it. My
efforts in linking the form and subform have resulted in unbound
objects. I would like to trigger subform population on the press of the
command button. Can anyone offer any advice or point me to some place
that has this information?

Thanks in advance.
Brian


Tom van Stiphout
Guest
 
Posts: n/a
#2: Feb 22 '06

re: Create Form-Subform to Perform Searches


On 21 Feb 2006 16:16:15 -0800, ghat12@gmail.com wrote:

So you already have a form in datasheet that works.
Bring your Criteria form in design view, and drag-n-drop the Results
form onto it. Voila: a subform. No need to set LinkChild/MasterFields.
Just set the subform's recordsource:
Me.subfrmResults.Form.RecordSource = xxxx

-Tom.

[color=blue]
>Hi,
>
>I have created a form containing 5 textfields/combo boxes and a command
>button to conduct searches for matching records. My results are
>currently displayed as a separate datasheet which is launched by
>specifying the query in the OnClick property of the command button.
>
>I would like to create a form that displays the results in a datasheet
>on the bottom portion of the same form. I understand that this requires
>using the form-subform framework but don't know how to create it. My
>efforts in linking the form and subform have resulted in unbound
>objects. I would like to trigger subform population on the press of the
>command button. Can anyone offer any advice or point me to some place
>that has this information?
>
>Thanks in advance.
>Brian[/color]

ghat12@gmail.com
Guest
 
Posts: n/a
#3: Feb 22 '06

re: Create Form-Subform to Perform Searches


Thanks Tom. This seems to be woking partially. When I run searches with
the first criteria by itself or the first criteria and another
criteria, the search works. However, when I perform a search using
anything but the first criteria, the search fails. Any idea why? I did
not face this problem with the separate datasheet.

Tom van Stiphout
Guest
 
Posts: n/a
#4: Feb 22 '06

re: Create Form-Subform to Perform Searches


On 22 Feb 2006 05:05:53 -0800, "ghat12@gmail.com" <ghat12@gmail.com>
wrote:

Not sure what exactly you mean. You may have to show us some real
examples and some code.

-Tom.

[color=blue]
>Thanks Tom. This seems to be woking partially. When I run searches with
>the first criteria by itself or the first criteria and another
>criteria, the search works. However, when I perform a search using
>anything but the first criteria, the search fails. Any idea why? I did
>not face this problem with the separate datasheet.[/color]

Closed Thread