• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2065
  • Last Modified:

Refresh form button in access 2010

Hi.  I have form which includes multiple tabs.  One of the form tabs reflecting calculations.

Issue: data was not constantly stored in the database after I adjust field "x" or field "z"  

See below: field "y" = field "x" + field "z" (of course I mean values)

form field "q" taken from the source query which involves value of the field "y"

I have button to refresh form data with the following code  "DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70"

I suggested to replace above listed code with Me.Refresh  

Question: would you please tell me wheter above listed code <b>"DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70" </b> is correct and reliable? Can we use such code at any time or we have some limitations?

Per my opinion, the code Me.Refresh or Me.Requery is more sofisticated in order to refresh data in the form using calculated fields.
0
maximyshka
Asked:
maximyshka
  • 2
1 Solution
 
Jeffrey CoachmanCommented:
That syntax is correct, although it may not always remain valid in Access 2007 or newer database formats.
That is really an old way of doing things in code.

Wouldn't you agree that:
Docmd.Refresh
or
Docmd.Requery
...are much easier to write and understand?

;-)

JeffCoachman
0
 
maximyshkaAuthor Commented:
What about me.refresh or me.requery

Same thing or any issues?
0
 
Jeffrey CoachmanCommented:
...

LOL

That is what I meant..

See, you correcting me now, ...soon you won't need us at all...

;-)

Jeff
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now