Requery on Subform

B

briank

I have a form with a subform (with three tabs). On my main form when I
navigate from record to record a macro is run that modifies an existing
seperate table. This table is the basis for a datasheet that is shown in one
of the tabs. Ideally when I scroll up/down to the next record, the macro is
run, the table is updated and this info is reflected in a datasheet that is
shown on the subform. However, the subform's datasheet doesn't automatically
show updated information. Instead, I have to toggle between the tabs and
then the data is shown. I'm thinking some sort of refresh or requery is
needed but can not get this working. Also, is it more efficient to simply
run this macro only if one views the tab with the datasheet as opposed to
running it everytime the record is changed? Any thoughts?

Private Sub Form_Current()
DoCmd.RunMacro "mcrQryFeederDataChange"
Me!sbfrm_tblFeederPayments.Refresh
 
Top