Help with DoMenuItem

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I've got a database that was converted from 95 to 97.
it has a form with many subforms on it.
The subforms hold data from numerous queries based on
parameters entered.
The code to refresh the data is
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
I'm assumming that the 5 is for refresh but can't find the
list of 95 commands to verify this.
I've converted the queries to oracle passthrus. I can get
the passthrus updated with new parameter info but it seems
that the above code fails to refresh the data in the forms.
I need to close the form to get the passthrus to refresh.
Is there a better way to rewrite the refresh procedure
that will allow the "modified" passthrus to repopulate the
subforms without having to close them?
 
I would as a rule avoid any menu item call....

For a form, to re-load the query..you use

me.Requery

And, if you have a sub-form...then simply execute the requery on the
sub-form like:

me.MySubFrom.Form.Requery

Just replace "mysubform" with whatever you gave the name of the sub-form
control (note that a sub-form is not really a sub-form..but only a
control...and thus you the "form" property to get at the form.....
 
It didn't work.
I have a form named TER1 with a tabcontrol containing
8 "pages", each with its own subform on it.
On one of these pages is the subform MSummary.
In the Refresh button (on the TER1 form), I coded
Me.MSummary.Requery
The passthru for this query is created in a function
because it uses parameters stored in Access to query an
Oracle Database. The above code did update the passthru
query however it didn't rerun the query to update the
dataset. Could the fact that it is a passthru and not an
Access query be the reason why?
(I also ran
Me.TER_Multi_Emplno_Summary_Subform.Requery with no better
results. This is the name of the subform on MSummary)
 
It didn't work.
I have a form named TER1 with a tabcontrol containing
8 "pages", each with its own subform on it.
On one of these pages is the subform MSummary.
In the Refresh button (on the TER1 form), I coded
Me.MSummary.Requery

The format is NOT what I poseted.....try:

me.MSummary.Form.Requery

So, to use any of the (sub) forms events/mehtoeds..you use the ".form"
properity of the sub-form contorl....
 
Back
Top