Article ID: 149033
Article Last Modified on 1/8/2003
Public Sub PassDB(MyDB As Database)use:
Public Sub PassDB(MyDB As Object)All code in the body of the procedure or function that takes the database object can be written in the same way as if the parameter had been passed As database. Note that the As Database will work correctly with Visual Basic 4.0 32-bit and Jet 3.0.
129801 How to Create and Use a Minimal OLE Automation Server
Public Sub PassDB(MyDB as Database)
End Sub
Public Sub Form_Click()
Dim x As Project1.Class1
Dim db As Database
Set x = New Project1.Class1
Set db = OpenDatabase("Biblio.mdb")
x.PassDB db
End Sub
Keywords: kbbug KB149033