>>I was thinking that's what would probably have to happen. I'm using a MDI form so publicy declaring them there would allow the rest of the app to access them. With this app, staff may have 3 or 4 patients open at one time. How can I create variables though if they have to be crreated dynamically?
>>
>>i.e. I want to open up a frmPatient for patient Dalio, Jason (ClientID = 7). So my desired name for the form would be NewPatientForm-7. This way i can reference based on the ClientID of the current active form.
>>
>>How can I Dim this though? Basically my goal is to be able to open as many instances of the form as the user wants, but to be able to reference the forms individually at run-time. Any ideas? Thanks Eric.
>
>Hi Jason,
>
>Why not create an array of form object references? I have a VB app that allows any number of instances of a single form, each with it's own state...I can send you the code, if you like...
I just read Eric's post, so I will follow this post up with the statement that you could use the Forms collection with a variable to uniquely identify each form as Eric suggests. That is a sound approach.
I typically avoid collections as they are much slower to iterate through than arrays are. Either way will work, however.