I hope you had answers to your questions because I would be 
interested also.  I do not know very much Access programming but I 
had a similar circumstance to yours and used the following code which 
Access generated.

Private Sub Combo52_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[Description] = '" & Me![Combo52] & "'"
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

It works well.  When I change the value in [combo52] on the form two 
subforms are updated.  One of the subforms has multiple tabs and that 
works fine also.

Dennis



--- In [email protected], offshorewindinwinter 
<no_re...@...> wrote:
>
> I want to use a datasheet/subdatasheet in a subform to show the
> resulting recordset formed by of a user changing different 
parameters
> on the form. In short I have got everything working except the 
ability
> to requery and display the recordset.
> 
> That is I have got the datasheet/subdatasheet showing on the 
subform.
> 
> I have used VBA to create the SQL based on the parameters entered by
> the user.
> 
> I have used VBA to change the Query Definition of the underlying
> query.
> 
> All successfully. That is the datasheet shows as I want it in the
> subform. The Query after the Query Def change works properly. All 
that
> is missing is the ability to force Access to do a requery and show 
the
> new recordset.
> 
> The statements I have tried are:
> 
> Me.requery
> Me!subInventory.requery
> Me.refresh
> Me!subInventory.refresh
> 
> I have a partial solution in that if I give up on showing the query 
in
> a subform and simply open a new window with DoCmd.OpenQuery 
everything
> works fine.
> 
> Thanks for your help,
> 
> Neil
>


Reply via email to