Solved

MS Access : multiple instances of form => can't use . recordset property

Posted on 2004-08-19
3
244 Views
Last Modified: 2008-03-03
hi all,

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
Window= Coll_Customerforms.Count
Coll_Customerforms.Item(Window).Caption = "Clientform " & Windownumber
Coll_Customerforms.Item(Window).Recordset.FindFirst "ID=" & nr

Why does this last line not work?
0
Comment
Question by:Thomas_VDB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
naivad earned 40 total points
ID: 11846976
Option Compare Database
Private myNewForm As Form_Form4
Private Sub Command2_Click()

   
    Set myNewForm = New Form_Form4
   
    With myNewForm
        .Caption = "test"
        .Filter = "ID=" & nr
        .FilterOn = True
        .Visible = True
    End With
   
End Sub
0
 
LVL 4

Expert Comment

by:naivad
ID: 11846978
might have to bracket ID


"[ID]=" & nr
0
 

Author Comment

by:Thomas_VDB
ID: 11852098
Hi thanks for the comment,

but I found the mistake : I can't use the command "Findfirst" (=DAO), must use the command "Find" (=ADO).
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question