Solved

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

Posted on 2004-08-19
3
240 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
  • 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What is ISQL? 6 125
export Oracle diagram from Oracle DB including VIEWS 8 105
Best RAID for a BDD Oracle 4 62
Oracle Public Synonyms and Privileges 2 51
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now