Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing MS Access Data

Status
Not open for further replies.

chippyles

Technical User
Nov 10, 2004
49
0
0
US
have a button on a form that I want the user to be able to refresh the data, but I can not get it to work.

This is the code I am using. When I click the button nothing happens. What is the code that I should be using?

Me.RePaint

or

Me.Refresh

do not work
 
You can use Me.Refresh or try any of these
Code:
 DoCmd.RunCommand acCmdRefresh
Code:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Regards

Zameer Abdulla
JVBP MDS
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
And Me.Requery ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
None of these code are working!!??
Please check if the command button is bound to the code!!
There is a chance the "Event Procedure" is erased from the properties window.

Or try creating command button through the wizard.. Choose Form Operations > Refresh from data

Zameer Abdulla
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
I just did the wizard and it seems to be refreshing the Form Header and not the Detail section. If I press Shift F9, it works. the button however does not. How can I create a command that similates the shift F9 or does the Me.Requery on the detail from the form header?
 
forget it now. Everyone kept telling me to do Me.Requery

I just put in DoCmd.Requery and it works now.

Thanks!!
 
It is refreshing the header and not the detail!!??
Now I doubt the detail you say is can be a subform
If yes then try
Me!YourSubformName.Requery
change the YourSubformName to actual name used for subform in the mainform
hope this helps


Zameer Abdulla
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
PHV,
Can you please explain me what is the difference between
Me.Requery & Docmd.Requery ?
I am confused now...
Thanks

Zameer Abdulla
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top