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

An Easy one for you vets

Status
Not open for further replies.

benu302000

Programmer
Aug 11, 2004
23
0
0
US
Ok, How do I get a subform to refresh it's contents? I know its called requery, but how does that work? and is there a way to do it continually, or every so often?
 
Using a timer control, possibly:
Code:
Private Sub Form_Timer()
   Form.Requery
End Sub

That would be my guess, and just put it on your subform, not main form. The code would be the exact same, so long as you have the timer event on the same form you are requerying.

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
How are ya benu302000 . . . . .

Code:
[blue]For single/mainform:
[purple]Me.Requery
Forms!FormName.Requery[/purple]

For subForm 1 level deep:
[purple]Forms!FormName!subFormName.Form.Requery[/purple][/blue]
As already suggested by [blue]kjv1611[/blue] you can use the [blue]Timer Event[/blue]

Whats causing you to have to continually refresh?

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top