Refresh a subform after an Append Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access XP running on WinXP sp2

Using a tabControl, on one of the tabs have two subforms. in the first
subform, I select three items from comboboxes and enter a numerical value in
a text box. values are then used to fill an append query along with
identifying customer information from the main form containing the
tabControl. a cmd buttom runs the VBA for the query. on the second subform,
the results are displayed in DataSheet view. the append query runs correctly,

the problem is the DataSheet does not update and display the new record.

second subform's record source is a select query, which I open and close
after the Append query runs. have tried me.requery; me.refresh; coresponding
DOCMD's to no avail.

any suggestions other that opening and closing the whole form?

Thanks in advance;
 
If I understand correctly, you have a main form with two subforms and you
want actions in the first subform to requery the second subform. One way to
do this is to create a public procedure in the main form that refreshes the
second subform:

Public Sub RefreshSub2()
Me.SubformControl2.Requery
End Sub

Then call this procedure from the first subform after the data has been
changed:

Forms!MainForm.RefreshSub2
 
Back
Top