
Originally Posted by
TamworthBob
Set frm = New Form_ContactDetails
frm.Visible = True
frm.Caption = frm.hwnd & ", ContactDetails Copy " & Now()
Is the combobox bound to anything?
Perhaps try something like
frm.control("ComboBox").text = ""
and for the subform perhaps it is using the same subform as the main since you only copied the main for it probably only created a new container control that references the same one.
Code:
Private Sub Command256_Click()
'Purpose: Open an independent instance of form frmClient.
Dim frm As Form, subfrm As Form
Set subfrm = New Form_SubformName
'Open a new instance, show it, and set a caption.
Set frm = New Form_ContactDetails
frm.Visible = True
frm.Caption = frm.hwnd & ", ContactDetails Copy " & Now()
frm.control("ComboBox").text = ""
frm.control("SubformContainerName").SourceObject = subfrm
'Append it to our collection.
clnClient.Add Item:=frm, Key:=CStr(frm.hwnd)
Set frm = Nothing
End Sub
Alternatively if you don't want to create a new subform you could write a loop to cycle through the subform controls and clear them all after the new form has been appended (or before).
Hope that is the right fix for you!