473,382 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Findfirst/Edit problem

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")
  3.  
  4. CaseDetails.FindFirst "[NHS]='" & SaveNHS & "' AND [Referral]=" & SaveReferralRef
  5.  
  6. CaseDetails.Edit
Jan 12 '09 #1
3 2142
RuralGuy
375 Expert 256MB
Did you find anything with the .FindFirst? If Not CaseDetails.NoMatch Then
Jan 12 '09 #2
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
Panic over. Spotted my deliberate mistake with the column names. Thanks for you help, anyway.

Problem solved!
Jan 13 '09 #4

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

Similar topics

5
by: Mike | last post by:
Hi I've written a module to find the first occurrence of a record in a query (that is my forms datasource) that matches four specified criteria. No matter what I try it doesn't seem to find ...
3
by: Mark | last post by:
I get "error 3077 Syntax Error (missing operator) in expression" in this expression: Rst.FindFirst "='" & Me!NewSection & "'" when Me!NewSection contains an apostrophe. How can I write the...
5
by: Paul | last post by:
The 2 statements below work perfectly when using them individually. But when I try to concatenate them, they don't. rst.FindFirst " = " & OldQuoteNumber rst.FindFirst " Is Null" Can someone...
1
by: cnlai | last post by:
Snippets -------- Dim mydb As Database, myset As DAO.Recordset Set mydb = CurrentDb Set myset = mydb.OpenRecordset("abc") myset.FindFirst (" = 'S02'") '<< problem here Reference: MS DAO...
2
by: @ndy | last post by:
Hey, this is the situation. I have imported a table from Excel and know i must edit the saldo in the corresponding records tbl_Lignes. Impdata tbl_Lignes...
2
by: rivka.howley | last post by:
I wrote some code that creates a table with a date/time field at 15-minute intervals. Here's how I create and populate the table With tblDataTemp ..Fields.Append .CreateField("CT_ID", dbLong)...
3
by: wvhines | last post by:
Hello: I am an ambitious novice...I have a main form "frmGeneralContracting" that has a subform on it called "frmsubDeliverables" and I am trying to restrict editing if the current user's login...
3
by: developing | last post by:
Hello How do I specify multiple criteria for FindFirst or FindRecord (or anything else) that takes the criteria from a form. (text field and number field) edit: this will be in the after...
25
by: Rick Collard | last post by:
Using DAO 3.6 on an Access 2002 database, I'm getting unexpected results with the FindFirst method. Here's the simple code to test: Public Sub FindIt() Dim db As Database, rs As Recordset...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.