Subform not requerying after changing the Underlying query

N

Nick_Japan

Hi All,

I have a button that changes the underyling query used by a subform,
depending of the values in a set of controls. Updated using QueryDef

The query change is ok (if I close and reopen the form it is fine), just the
Me.SubName.Form.Requery command does not do anything. I assume this is
because I have changed the query, so I can't "requery".

Is there a way to get around this?

Many thanks.
 
A

Allen Browne

Would it be easier just to set the RecordSource of the subform to the query
statement?

Example:
Me.[Sub1].Form.RecordSource = "SELECT ...
 
Top