OpenForm when form is already open?

freem500

Registered User.
Local time
Today, 20:26
Joined
Apr 23, 2007
Messages
19
I have a situation where a form is called from another form using this line of code.
Code:
DoCmd.OpenForm strName, , , strLinkCriteria, , , Me.fldPartnerID
If the form is not open, it works fine, but if the form is already open, I don't get an error but the value in OpenArgs (Me.fldPartnerID) is still set to the previous value.

How would I pass a value from the first form to the second and cater for the possibility that the second form is already open? Or would I be better closing the second form every time?

Thanks
 
check if the form is loaded using the isloaded function
 
Thanks - that seems to have worked!
 

Users who are viewing this thread

Back
Top Bottom