J
JGPatrick
Hennig et al is raising more questions for me than it is answering, as you
might guess from my previous two posts.
Hennig et al say the way to establish a reference to the default database is
to create a DAO.database property:
*****
Public dbC as DAO.database
Public Property Get CurrentDbC() As DAO.Database
If (dbC Is Nothing) Then Set dbC = CurrentDb()
Set CurrentDbC = dbC
End Property
*****
and then use the property, for eg:
*****
Sub Prac()
Dim Dbs As DAO.Database
Set Dbs = CurrentDbC
End Sub
******
My question is, why wouldn't you just do the following, which simply uses
the built-in CurrentDb function:
Sub Prac()
Dim Dbs As DAO.Database
Set Dbs = CurrentDb()
End Sub
might guess from my previous two posts.
Hennig et al say the way to establish a reference to the default database is
to create a DAO.database property:
*****
Public dbC as DAO.database
Public Property Get CurrentDbC() As DAO.Database
If (dbC Is Nothing) Then Set dbC = CurrentDb()
Set CurrentDbC = dbC
End Property
*****
and then use the property, for eg:
*****
Sub Prac()
Dim Dbs As DAO.Database
Set Dbs = CurrentDbC
End Sub
******
My question is, why wouldn't you just do the following, which simply uses
the built-in CurrentDb function:
Sub Prac()
Dim Dbs As DAO.Database
Set Dbs = CurrentDb()
End Sub