Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old February 22nd, 2006, 12:25 AM
ghat12@gmail.com
Guest
 
Posts: n/a
Default Create Form-Subform to Perform Searches

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




  #2  
Old February 22nd, 2006, 03:35 AM
Tom van Stiphout
Guest
 
Posts: n/a
Default 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]

  #3  
Old February 22nd, 2006, 01:15 PM
ghat12@gmail.com
Guest
 
Posts: n/a
Default 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.

  #4  
Old February 22nd, 2006, 01:45 PM
Tom van Stiphout
Guest
 
Posts: n/a
Default 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]

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,414 network members.