DAO 3.51 vs DAO 3.6

J

JPG

I am having an issue with various PC's and the references set in my Access
DB. I am using Access 2002 and have DAO3.6 seleted as a reference but on
ertain PC's I am getting an error saying "That command is not available."
When debugging the error hits on the .edit of a recordset. What I have found
is that on the machines where I encounter this problem, the only DAO
available is the 3.6. When I manually load the 3.51.dll and select it as a
refernence instead, everything runs fine. I thought that the 3.51 was for
previous versions of Access?
 
J

JPG

Thanks Doug,
Do you know why I would be getting this error, even when referencing 3.6,
only on the machines that do not have the 3.51 installed?
 
J

JPG

Here is a snippet from the beginning of this module:

Public Sub Add_System_Calculations_to_Table(strPRB, intDaysPastDue) 'module 4
With Session

Dim dteCurrentdate As Date
Dim RecSet As Recordset
Set DB = CurrentDb

dteCurrentdate = Date


SQL = "SELECT * FROM tbl_User_Transactions"
Set RecSet = DB.OpenRecordset(SQL, dbOpenDynaset)

RecSet.AddNew


RecSet.Fields("Processor").Value =
[Forms]![frm_Log_In]![txtUserID]


It is at the RecSet.AddNew that I get the following error:

Run-time Error '3320'
Function is not available in expressions in table-level validation expression.

As I mentioned earlier this runs fine on certain machines, but the ones were
I get the error are missing the DAO 3.51, which I am not referencing
originally. If I manually load this .dll and set the reference to it, it runs
fine. The problem is that this is on a network and I am unable to make this
manual change to all PC's. Additionally, I don't understand why the 3.51
works over th e3.6 in Access 2002.

Your assistance is greatly appreciated.
 
D

Douglas J Steele

You're trying to use DAO code. By default, Access 2000 and 2002 don't have a
reference set to DAO, and in Access 2003, the reference to ADO is higher in
the list, thereby giving it precedence over DAO.

Recordset happens to be an object in both the ADO and DAO models, so unless
you disambiguate, you're probably not actually getting a DAO recordset.

Try changing your declaration to

Dim RecSet As DAO.Recordset


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


JPG said:
Here is a snippet from the beginning of this module:

Public Sub Add_System_Calculations_to_Table(strPRB, intDaysPastDue) 'module 4
With Session

Dim dteCurrentdate As Date
Dim RecSet As Recordset
Set DB = CurrentDb

dteCurrentdate = Date


SQL = "SELECT * FROM tbl_User_Transactions"
Set RecSet = DB.OpenRecordset(SQL, dbOpenDynaset)

RecSet.AddNew


RecSet.Fields("Processor").Value =
[Forms]![frm_Log_In]![txtUserID]


It is at the RecSet.AddNew that I get the following error:

Run-time Error '3320'
Function is not available in expressions in table-level validation expression.

As I mentioned earlier this runs fine on certain machines, but the ones were
I get the error are missing the DAO 3.51, which I am not referencing
originally. If I manually load this .dll and set the reference to it, it runs
fine. The problem is that this is on a network and I am unable to make this
manual change to all PC's. Additionally, I don't understand why the 3.51
works over th e3.6 in Access 2002.

Your assistance is greatly appreciated.

Douglas J Steele said:
What's the actual code you're using?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


have
found it as
a was
for
 
J

JPG

Great Help. Thanks a million.

Douglas J Steele said:
You're trying to use DAO code. By default, Access 2000 and 2002 don't have a
reference set to DAO, and in Access 2003, the reference to ADO is higher in
the list, thereby giving it precedence over DAO.

Recordset happens to be an object in both the ADO and DAO models, so unless
you disambiguate, you're probably not actually getting a DAO recordset.

Try changing your declaration to

Dim RecSet As DAO.Recordset


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


JPG said:
Here is a snippet from the beginning of this module:

Public Sub Add_System_Calculations_to_Table(strPRB, intDaysPastDue) 'module 4
With Session

Dim dteCurrentdate As Date
Dim RecSet As Recordset
Set DB = CurrentDb

dteCurrentdate = Date


SQL = "SELECT * FROM tbl_User_Transactions"
Set RecSet = DB.OpenRecordset(SQL, dbOpenDynaset)

RecSet.AddNew


RecSet.Fields("Processor").Value =
[Forms]![frm_Log_In]![txtUserID]


It is at the RecSet.AddNew that I get the following error:

Run-time Error '3320'
Function is not available in expressions in table-level validation expression.

As I mentioned earlier this runs fine on certain machines, but the ones were
I get the error are missing the DAO 3.51, which I am not referencing
originally. If I manually load this .dll and set the reference to it, it runs
fine. The problem is that this is on a network and I am unable to make this
manual change to all PC's. Additionally, I don't understand why the 3.51
works over th e3.6 in Access 2002.

Your assistance is greatly appreciated.

Douglas J Steele said:
What's the actual code you're using?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Thanks Doug,
Do you know why I would be getting this error, even when referencing 3.6,
only on the machines that do not have the 3.51 installed?


:

I am having an issue with various PC's and the references set in my
Access
DB. I am using Access 2002 and have DAO3.6 seleted as a reference but on
ertain PC's I am getting an error saying "That command is not
available."
When debugging the error hits on the .edit of a recordset. What I have
found
is that on the machines where I encounter this problem, the only DAO
available is the 3.6. When I manually load the 3.51.dll and select it as
a
refernence instead, everything runs fine. I thought that the 3.51 was
for
previous versions of Access?
 
S

shn

JPG said:
I am having an issue with various PC's and the references set in my Access
DB. I am using Access 2002 and have DAO3.6 seleted as a reference but on
ertain PC's I am getting an error saying "That command is not available."
When debugging the error hits on the .edit of a recordset. What I have
found
is that on the machines where I encounter this problem, the only DAO
available is the 3.6. When I manually load the 3.51.dll and select it as a
refernence instead, everything runs fine. I thought that the 3.51 was for
previous versions of Access?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top