|
-
Jul 1st, 2000, 09:31 PM
#1
Thread Starter
Junior Member
I've started working on my first MDI application. When it loads, I want it to set the database and recordsets so that they'll be accessible to all the child forms by name. So I've done this so far (the declarations are behind the MDI form, which is the project's start form):
Code:
Public db as database
Public rs as recordset
Public Sub MDIForm_Load()
Set db=OpenDataBase("Path")
Set rs=db.OpenRecordSet("name")
End Sub
Every thing's "public" right? So why can't the MDI's child forms "see" the recordset object, as in:
Code:
Public Sub Command1_Click()
some_variable=rs.Fields!fieldname
End Sub
Which produces the all too troubling error 424. I'm sure it's simple, but I'm perplexed.
-
Jul 1st, 2000, 10:39 PM
#2
Hyperactive Member
Check and double check your path. It looks right to me.
-
Jul 2nd, 2000, 03:03 AM
#3
Lively Member
You have to reference the recordsets using the form name. So Form1.rs if thats where it is declared. Alternatively you can put the recordset and database declarations into a bas module and then you can just access them directly
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|