MS Access : multiple instances of form => can't use . recordset property
Posted on 2004-08-19
I want the user to be able to view multiple instances of my 'customer form' in my MS Access Project.
I am able to do that : I have created a function that creates a new form and puts its reference in a collection (Coll_Customerforms).
I use the following code to set the bookmark of the new form to a selected value (txt_customernumber).
As you can see, I also change the caption.
Changing the caption works okay, but asking the recordset property is not (method not supported) :
Private Sub cmd_client_Click()
Dim nr, Windownumber As Integer
nr = Me.txt_customernumber
New_Customerform '= function to create and activate new instance of form
Coll_Customerforms.Item(Window).Caption = "Clientform " & Windownumber
Coll_Customerforms.Item(Window).Recordset.FindFirst "ID=" & nr
Why does this last line not work?