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):
Every thing's "public" right? So why can't the MDI's child forms "see" the recordset object, as in:Code:Public db as database Public rs as recordset Public Sub MDIForm_Load() Set db=OpenDataBase("Path") Set rs=db.OpenRecordSet("name") End Sub
Which produces the all too troubling error 424. I'm sure it's simple, but I'm perplexed.Code:Public Sub Command1_Click() some_variable=rs.Fields!fieldname End Sub




Reply With Quote