Hello,
I have a form to which I pass some OpenArgs and WhereCondition when I open it from another form. I am now trying to use multiple instances of the form. The code I am using is given below:
Private mcolFormInstances As New Collection
Function OpenFormInstance(FormName As String, Optional WhereCondition As String, Optional OpenArgs As String)
'Declare the form name
Dim frm As Form
gblnOpenedByAnother = True
'Set frm = New Form_Bank
Select Case FormName
Case "frmBank"
Set frm = New Form_frmBank
Case Else
Debug.Assert False
End Select
This is all fine but when I try and assign some OpenArgs to the newly created frm, it tells me that this is read-only. Is there any way of passing the OpenArgs to the form when I am setting the new class object?
Many thanks for your help,
Rudra
I have a form to which I pass some OpenArgs and WhereCondition when I open it from another form. I am now trying to use multiple instances of the form. The code I am using is given below:
Private mcolFormInstances As New Collection
Function OpenFormInstance(FormName As String, Optional WhereCondition As String, Optional OpenArgs As String)
'Declare the form name
Dim frm As Form
gblnOpenedByAnother = True
'Set frm = New Form_Bank
Select Case FormName
Case "frmBank"
Set frm = New Form_frmBank
Case Else
Debug.Assert False
End Select
This is all fine but when I try and assign some OpenArgs to the newly created frm, it tells me that this is read-only. Is there any way of passing the OpenArgs to the form when I am setting the new class object?
Many thanks for your help,
Rudra