sambo
Registered User.
- Local time
- Today, 05:19
- Joined
- Aug 29, 2002
- Messages
- 289
I am trying to requery all of the subforms in my tab control when information from a certain unbound form is entered into the tables. Here is what I have so far, but it doesn't seem to want to cooperate.
Dim myObj As AccessObject, db As Object
Set db = Application.CurrentData 'get the current db data
For Each myObj In db.AllForms 'loop through all open forms
On Error Resume Next
If myObj.IsLoaded Then 'if the form is open
myObj.Requery 'requery the recSource (same as SHIFT + F9)
End If
Next myObj 'loop through all forms
I get the error, 'Object doesn't support this property or method' at the For Each Line.
Any Suggestions
Dim myObj As AccessObject, db As Object
Set db = Application.CurrentData 'get the current db data
For Each myObj In db.AllForms 'loop through all open forms
On Error Resume Next
If myObj.IsLoaded Then 'if the form is open
myObj.Requery 'requery the recSource (same as SHIFT + F9)
End If
Next myObj 'loop through all forms
I get the error, 'Object doesn't support this property or method' at the For Each Line.
Any Suggestions