By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,409 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

Findfirst/Edit problem

P: 34
I'm trying to update a table, but when I get to the ".edit" line in my coding, I get the error message: "Run-time error 3251 - Operation is not supported for this type of object"

I've played around with changing some of the variables, but the samthin happens.Any ideas?

The table being updated is a local one within the db.

Relevant code bits:

Expand|Select|Wrap|Line Numbers
  1.  Dim CaseDetails As Recordset
  2. Set CaseDetails = CurrentDb.OpenRecordset("PathwayCases")
  4. CaseDetails.FindFirst "[NHS]='" & SaveNHS & "' AND [Referral]=" & SaveReferralRef
  6. CaseDetails.Edit
Jan 12 '09 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 375
Did you find anything with the .FindFirst? If Not CaseDetails.NoMatch Then
Jan 12 '09 #2

P: 34
I found, somewhere on the net that it might be because of the OpenRecordset statement. I have now changed it to:

Set CaseDetails = CurrentDb.OpenRecordset("Pathway Cases", dbOpenDynaset)

Now I'm getting a different error.The data should match, (in fact CaseDetails.NoMatch = False when running).

Now I am getting: "The Microsoft Office Access databse engine does not recognize 'Referral' as a valid field name or expression." (which is daft because 'Referral' is a valid column name for the table).

What do you think?
Jan 13 '09 #3

P: 34
Panic over. Spotted my deliberate mistake with the column names. Thanks for you help, anyway.

Problem solved!
Jan 13 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.