I was reading about late binding in meantime, but I'm not completely sure
what is to be done in order to adjust code to lata binding...
For example, I'm not sure if this is correct:
early binding:
Dim ws As DAO.Workspace
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim rs As DAO.Recordset
late binding:
Dim ws as Object
Set ws =CreateObject("DAO.Workspace")
Dim ws as Object
Set db =CreateObject("DAO.Database")
Dim qdf as Object
Set qdf =CreateObject("DAO.QueryDef")
Dim rs as Object
Set rs =CreateObject("DAO.Recordset")
VBA help says that class argument inside Create object function has to be in
appname.objecttype format. Does it means that DAO should be preceded by
Access, so the previous code should be like this:
Dim ws as Object
Set ws =CreateObject("Access.DAO.Workspace")
Dim ws as Object
Set db =CreateObject("Access.DAO.Database")
Dim qdf as Object
Set qdf =CreateObject("Access.DAO.QueryDef")
Dim rs as Object
Set rs =CreateObject("Access.DAO.Recordset")
?
What exactly I need to change in my code in order to support "late binding"
?
All examples given in VBA help and internet are concerning late binding in
case of calling other Office aplication from Access, but I couldn't find
examples of late binding inside Access itself...so I'm little bit confused.
Is there any Add-in or program, that can change early binding declarations
to late binding declarations through all modules automaticcally ?
Zlatko
<pi********@hotmail.com> je napisao u poruci interesnoj
grupi:11**********************@g47g2000cwa.googleg roups.com...
use late binding instead of early binding and then your code should be
less susceptible to problems with installed versions. It may mean you
have to either check for version information in your code or use the
sort of least common denominator when writing your code.
<pi********@hotmail.com> je napisao u poruci interesnoj
grupi:11**********************@g47g2000cwa.googleg roups.com... use late binding instead of early binding and then your code should be
less susceptible to problems with installed versions. It may mean you
have to either check for version information in your code or use the
sort of least common denominator when writing your code.