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.
maximyshkaAsked:
Who is Participating?
 
Jeffrey CoachmanMIS LiasonCommented:
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 CoachmanMIS LiasonCommented:
...

LOL

That is what I meant..

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

;-)

Jeff
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.