|
Forms Collection error
Posted: 01 Aug 07 12:36 PM
|
In v7, I am making an update in OnAfterPost on the Contact Detail screen. The field value is displayed in one of my tabs, which may or may not be active at the time of the update. If I try to reference it directly from the forms collection but it has not yet been clicked on, I get an error. So, I wanted to loop through the forms collection to see if it is yet present, but I am getting an error. (I am assuming that would be a good way to find it.)
dim i msgbox Application.Forms.Count for i = 0 to Application.Forms.Count - 1 msgbox application.Forms(i).Name next
After a Ctrl-F5 refresh, the first msgbox count gives me 2 The first time into the loop when i = 0, application.Forms(i).Name returns "Form" for some reason. I guess I expected the Contact Detail form's name. The second time through the loop, I get an error "Object doesn't support this property or method" trying to return application.Forms(i).Name
Why isn't it getting all the way through the forms collection?? |
|
|