Re: Requery subform



This is an embedded subform right?

Yes.

Not one opened separately?

Correct.

If embedded are you using the MasterLink and ChildLink properties
to display the related records or does the subform's RecordSource
reference the ProjectType on the main form in its query criteria?

I'm not using the MasterLink and ChildLink properties. Instead, when
the user selects the search criteria (up to three criteria can be
selected using 3 combo boxes, one of which is ProjectType), the code
under the command button:

1) creates a query (called qryProjectList) (only does this if the query
doesn't exist),
2) gets the values from the combo boxes,
3) builds a SQL string,
4) passes the string to the query, and
5) requries the subform, which is based on this query.

Every step by the last one is working.

Rick Brandt wrote:
"Kurt" <kheisler6@xxxxxxx> wrote in message
news:1152051810.572789.156180@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
How do you know the subform is not being Requeried?

For example, if I select "Manuscript" for the ProjectType, and click
the command button, the subform should update to list only those
records for which "Manuscript" is the ProjectType.

But the subform doesn't update/requery to show the results of this
search.
(It still shows the results of the last search.) Of course, if I close
and reopen the form, the subform will properly show only manuscripts.
This tells me that the code which creates the query which the subform
is based on is working.

I'm completely stumped.

This is an embedded subform right? Not one opened separately? If embedded are
you using the MasterLink and ChildLink properties to display the related records
or does the subform's RecordSource reference the ProjectType on the main form in
its query criteria?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

.



Relevant Pages

  • RE: Display an error if date entered is equal to or in between 2 dates
    ... I re-did the query and in the subform, ... event to run the macro. ... >>in your query criteria of the for the start date put ...
    (microsoft.public.access.forms)
  • COMBO BOX FILTER ON A SUBFORM
    ... Use this in query criteria -- ... >i want to make a form with a subform based on a ... >Best regards to all of you ...
    (microsoft.public.access.gettingstarted)
  • Using Option Buttons to Modify a Query
    ... I have a form with a subform that uses a Query as its 'Source Object'. ... C, E, H, P, or X), the Query Criteria would be modified to use from 0 ... I also have 6 other buttons that I would like to use to sort the query ...
    (microsoft.public.access.formscoding)
  • Re: Suggestions Please - Subform Results Export to Excel
    ... --the name of the subform control ... --the query or table that is the record source of the main form ... now a parameter box appears requesting the ProjectID to base the query. ... Dim strSQL As String ...
    (microsoft.public.access.formscoding)
  • Re: Suggestions Please - Subform Results Export to Excel
    ... In your situation the form and subform are both based on the same table. ... Setting up the query with criteria like ... In the criteria row for ProjectID, ... Record Source: SELECT tblHours_Worked.ProjectID, ...
    (microsoft.public.access.formscoding)