edit recordset on backend

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that I use to create routes using mappoint and return a route
name to a table. It worked fine until I split the database into a front and
backend.
Now it tells me "operation not supported" when I try to find and write to a
record in the backend table.
Here is some of my code:
................................
Dim RstMembers As Recordset
Set RstMembers = db.OpenRecordset("Members")

‘……………………………………………………………
‘. . . . a bunch of code to create routes in MapPoint …
‘……………………………………………………………

'MATCH RECORDS USING SEEK ON MEMBER ID
RstMembers.Index = "PrimaryKey"
RstMembers.Seek "=", objRoute.Waypoints.Item(inx).NAME
RstMembers.Edit
RstMembers!HVPacket = "Route " & grp
RstMembers.Update
Next inx
At the "RstMembers.Index =" line it tells me that the operation is not
supported for this type of object.

Do I have to do something different now that "Members" table is linked?????
Thanks for any help.

Dave Werlin
 
OregonIzer said:
I have a form that I use to create routes using mappoint and return a route
name to a table. It worked fine until I split the database into a front and
backend.
Now it tells me "operation not supported" when I try to find and write to a
record in the backend table.
Here is some of my code:
...............................
Dim RstMembers As Recordset
Set RstMembers = db.OpenRecordset("Members")

‘……………………………………………………………
‘. . . . a bunch of code to create routes in MapPoint …
‘……………………………………………………………

'MATCH RECORDS USING SEEK ON MEMBER ID
RstMembers.Index = "PrimaryKey"
RstMembers.Seek "=", objRoute.Waypoints.Item(inx).NAME
RstMembers.Edit
RstMembers!HVPacket = "Route " & grp
RstMembers.Update
Next inx
At the "RstMembers.Index =" line it tells me that the operation is not
supported for this type of object.

Do I have to do something different now that "Members" table is linked?????
Thanks for any help.

Dave Werlin

Dave,

According to A2K help:

"You can't use the Seek method on a linked table because you can't open linked
tables as table-type Recordset objects.".....

And

......"Instead, you should design the query (that is, using the source argument
to the OpenRecordset method) with an appropriate WHERE clause that restricts
the returned records to only those that meet the criteria you would otherwise
use in a Find or Seek."


FWIW, I use .FindFirst in my linked tables mdb

Set rst = CurrentDb.OpenRecordset(strSQL)
rst.FindFirst "someStringfield = '" & MyVar & "'"
Field_Not_Found = rst.NoMatch
If Field_Not_Found Then
 
Thanks Steve - It worked perfectly.
- I actually need to reinstall my help files because I find many problems -
including not giving me the help screen for the seek method.

Your example was EXTREMELY helpful.

Thanks again.
 
OregonIzer said:
Thanks Steve - It worked perfectly.
- I actually need to reinstall my help files because I find many problems -
including not giving me the help screen for the seek method.

Your example was EXTREMELY helpful.

Thanks again.

:

You're welcome.
 
Back
Top