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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery or repaint to update all control values on a form together?

Status
Not open for further replies.

tvsmvp

Technical User
Aug 17, 2006
59
US
Is there a way to force all the controls on my form to update to current values simultaneously whenever I change a value somewhere on my form (via any and all controls)? I'm ending up with a bazillion strings of identical code, each attached to the event of several controls - when there's gotta be a way to force everything to update. I'm betting there's a way to force all the controls on the form using "requery," or "repaint"... something like that.
 
I've been trying to make "requery" work - which does when I use it per control. That is, I can tell it to do a requery in the event code for a particular control (and it updates that particular control) but naturally it doesn't update the other controls. I'm trying to figure out, then, what the code would be to "requery" all controls on the form together.
 
tvsmvp . . .

. . . or in a button try:
Code:
[blue]   Me.Requery[/blue]

Calvin.gif
See Ya! . . . . . .
 
You may consider Me.Recalc

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top