Ah, this is what I was thinking of:
If you openrecordset without the mode parameter, & the table is
linked, you get dbopendynaset by default, so the FindX methods work.
But if you move the table to local - perhaps to handle a multiuser
concurrency issue - the openrecordset defaults to dbopentable, so the
FindX methods stop working. Then you must go back & add the
dbopendynaset.
So a good rule probably is, when working in a fe/be environment, to
always specify the desired mode (dbopentable or dbopendynaset) when
you openrecordset. Then, if the mode is inconsistent with the table
location (linked vs local), the error will occur as soon as possible
(ie. on the openrecordset), instead of causing problems later on, eg.
on a FindX method.
TC
"TC" <a@b.c.d> wrote in message news:<1066623539.725775@teuthos>...[color=blue]
> That's not how I remember it, but I don't have Access here to check, so you
> may well be right. I'll try it tonight, & confirm it (one way to the other)
> tomorrow.
>
> TC
>
>
> "Tom van Stiphout" <tom7744@no.spam.cox.net> wrote in message
> news:gep5pv8eu8a1nkll1i44t9v8t5ad9vknuj@4ax.com...[color=green]
> > On Sun, 19 Oct 2003 17:32:32 +1200, "TC" <a@b.c.d> wrote:
> >
> > I think OpenDynaset is the default, if you don't specify the argument.
> >
> > Seek does not work on attached tables. If you want to use it, you need
> > to first open a database object representing the backend database.
> >
> > However, Tim is using FindFirst, which should work in all situations.
> >
> > -Tom.
> >
> >[color=darkred]
> > >If MyTable is a *linked* table, you have to use the dbOpenDynaset[/color][/color]
> parameter[color=green][color=darkred]
> > >on the openrecordset call if you want to use the Seek?...Find? methods on
> > >that recordset. I don't remember which, & I don't have Access here to[/color][/color]
> check.[color=green][color=darkred]
> > >Try that change & see if it helps.
> > >
> > >HTH,
> > >TC
> > >
> > >
> > >"Frusterated" <Frusterated@AccessHelp.com> wrote in message
> > >news:3f91617f$0$200$75868355@news.frii.net...
> > >> Hi,
> > >> I'm using Access-2k under Win-XP...
> > >> When I have a form with imbedded code it works perfect. Such as the
> > >> following code example.
> > >>
> > >> Dim db as DAO.Database
> > >> Dim rs as DAO.Recordset
> > >>
> > >> Set db = CurrentDB
> > >> set rs = db.OpenRecordset("MyTable")
> > >> rs.FindFirst "UPC=" & upcno
> > >>
> > >> BUT, when I use this same code in a module outside of any form I get[/color][/color]
> the[color=green][color=darkred]
> > >> following message:
> > >>
> > >> Run-time error 3251
> > >> Operation is not supported for this kind of object.
> > >>
> > >> I usually get around this problem by removing the "FindFirst" and
> > >> sequentially searching until I find the record in question. But I am
> > >> missing something in my understanding of Recordset Objects.
> > >> Please help me clear this up.
> > >>
> > >> TIA
> > >> Tim Hunter
> > >>
> > >>
> > >>
> > >>
> > >> *** Sent via Developersdex
http://www.developersdex.com ***
> > >> Don't just participate in USENET...get rewarded for it!
> > >[/color]
> >[/color][/color]