|
|
Subject:
Access 2002 - VBA Code - Referencing an AccessObject
Category: Computers > Programming Asked by: bselltiz-ga List Price: $10.00 |
Posted:
31 Oct 2002 10:16 PST
Expires: 30 Nov 2002 10:16 PST Question ID: 94352 |
I am developing an access 2002 application. I have the following piece of code: Dim objCurProj As CurrentProject Dim objAcObj As AccessObject Set objCurProj = Application.CurrentProject For Each objAcObj In objCurProj.AllForms If objAcObj.IsLoaded = True Then Debug.Print objAcObj.NAME & " OPEN" objAcObj.Requery 'PROBLEM HERE End If Next I am trying to call the requery method for any open form. The problem is that I do not know how to reference the method based upon the value I receive from the all forms collection. Can you tell me how to accomplish this and let me know the logic behind it? Brian Selltiz Digital Provisions |
|
Subject:
Re: Access 2002 - VBA Code - Referencing an AccessObject
Answered By: hammer-ga on 31 Oct 2002 10:42 PST Rated: |
Forms(objAcObj.Name).Requery The Forms collection has all the currently open forms. It can be indexed by name to get a particular Form. You can then use any methods or properties of the Form. Once IsLoaded returns True, then you know that the Form is available in the Forms collection. Please ask for clarification if you need further details. Good luck with your database! | |
| |
| |
| |
|
bselltiz-ga rated this answer: |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |