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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getdata.Edit - method not found error 1

Status
Not open for further replies.

aexley

Technical User
Jul 9, 2001
147
0
0
GB
I have imported a bit of code from another application (freeware) that would be extremely useful except for the fact that I get an error with this line:

GetData.Edit

I'm using Access 2000 and I don't know what version the code I'm using was written in. Is it from a previous version and if so what is the 2000 equivalent?

Thanks in advance

 
Could you provide a little more information?

A sample of the sourcecode would probably help...

Kim
 
This is the relevant few lines. If it's not enough please let me know. It's the line marked * that's producing the 'Method or data member not found' error.

Set GetData = CurDB.OpenRecordset(SQLStmt, DB_OPEN_DYNASET)
If Not GetData.EOF Then
* GetData.Edit
GetData!LastSelectedOption = Me![TypeofSearch]
GetData.Update
GetData.Close
End If
 
Has GetData been properly declared?
Code:
Dim GetData As Recordset
Are you using Access 2000? If so, you may want to
check the module references; make sure you have the
DAO reference included.

Kim
 
Yes it has:

Dim CurDB As Database, GetData As Recordset, RestofArgs As String
Set CurDB = CurrentDb()
.
.
etc

I am using Access 2000 and if you're referring to Microsoft DAO 3.6 I actually just included that in the references just this morning.

HTH

aexley
 
Hmmm... you may have to remove another module
that references some ADO or OLE modules. Sometimes
their recordset datatype conflicts with the DAO one.

This usually helps me fine.
 
Just been reading another thread Thread 705-202730 talking about problems with the reference libraries. So I tried removing them one by one and hey-presto the code appears to be running fine now (although I haven't checked full functionality yet). Unfortunately I didn't make a note of which one I removed.

This is a weird issue that keeps arising. Think it may be a case of watch this space.

Thanks for your help anyway.

aexley
 
:) Ha ha. Our posts crossed I think.

Thanks for your help.

aexley
 
You don't have to remove the ADO reference, just when you're dimensioning you object do it like this:
Dim GetData As DAO.Recordset that way Access knows which library to go to. Kyle ::)
 
Well.

You learn something new and useful every day here in Tektips.

Thanks KyleS

aexley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top