Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 vs. Access 2003

Status
Not open for further replies.

regava

Programmer
May 24, 2001
152
US
I have an application(.mdb) written in Access 2000. I was asked to start using Access 2003. The first thing that I tried to do in Access 2003 was to compile the file. The first error message from the compiler was 'Method or Data member not found' on the line "rec.edit" Then I changed it to "rec.EditMode" and got the message 'Invalid use of property.' If anybody knows of any document or other type of information regarding upgrade of Access 2000 to Access 2003 I will very much appreciate it if you can provide it to me. Thanks very much.
 
Sounds like a missing reference. Read through the post:
thread702-1447403

and see if that helps any.
 
With an ADODB recordset, you do not use rec.Edit.
 
Replace this:
Dim rec As Recordset
to this:
Dim rec As DAO.Recordset

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHS, thank fo your reply. However, when I entered DAO. the only options available are RecorSetOptionEnum, RecordSetTypeEnum and RecordSetstatusEnum. Following is the code that I use:
Code:
Public Static Sub setCDRSDPetition(strTatno As String, strCDRYN As String, DueDate As Variant, Optional strSineDieYN As Variant)
strSQL = "tblTracking"
Set db = CurrentDb()
Set rec = db.OpenRecordset(strSQL)
rec.index = "PrimaryKey"
rec.Seek "=", strTatno
rec.Edit
.
.Some fields are updated here
.
rec.Update
rec.Close
Set rec = Nothing
End Sub[\code]

Any help is appreciated.
 
Like fneily says - sounds like a missing reference. Were there any tagged as "missing" when you checked?

"Artificial Intelligence is no match for Natural Stupidity"
 
It seems that you have not added a reference to the Microsoft DAO 3.x Object Library.
 
Prioritize - might also help to move that reference above the ADO reference with the arrows on the side of the list.

"Artificial Intelligence is no match for Natural Stupidity"
 
Thanks to genomon and Remou.
There were no missing tags. and Microsoft DA0 3.6 Object library is in the reference.
As far as the prioritize - can you be more explicit. I really do not follow what you said, sorry.
 
You can use the arrow buttons to move the DAO refernce up as high as it will go in the references list.

Are you saying that you cannot type

Dim rec As DAO.Recordset

?
 
Remou, Thank you very much for your help. I moved the DAO reference all the way to the top and everything seems to be working as expected. Sorry I did not answer before but I was interrupted by the weekend. Have a wonderful day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top