Splitter - DAO - Error 3219

S

ScottB

[This message was posted today in the 'Forms Programming'
section but no real solution provided ...perhaps here?]

I created a test database with one small table and one
form. The form has one button on it that activates the
following event (copied in part):
Private Sub Command0_Click()
Dim curdb As DAO.Database
Dim rst As DAO.Recordset
Dim nm as String

Set curdb = CurrentDB
Set rst = curdb.OpenRecordset ("Table1", dbOpenTable)

With rst
....

The form, in fact, works fine "until" I used the Database
Splitter to separate it into front and back ends. Then,
when I try to use the same form it gives me a "Run-time
error '3219'; Invalid Operation" and crashes on the line
reading
Set rst = curdb.OpenRecordset ("Table1", dbOpenTable)

The program this simple test database was patterned after
worked fine about 6 mo. ago (even when split). My hunch
is that it has to do with an upgrade to Windows Server
2003 and less support for DAO libraries in Access 2002;
I'm using Microsoft DAO 3.6 Object Library for this test
database. Because of extensive naming conventions and
multiple databases used in my main project, I can't simply
bring tables all back into one project. From what I've
read about ADO, I think I'm better off staying with DAO
since it's all-Access and few users. Any sage words of
advice would really, really be appreciated. Scott
 
T

Tim Ferguson

Set rst = curdb.OpenRecordset ("Table1", dbOpenTable)

The form, in fact, works fine "until" I used the Database
Splitter to separate it into front and back ends.

If you check help, you'll see that it is not possible to open a Table type
recordset on anything other than a local (within the same mdb file) table.

You'll need to open it as a Dynaset instead. And it's a good idea to use a
SELECT query rather than a table name too: there really is normally no
reason to open a whole table.

Hope that helps


Tim F
 
K

Kevin K. Sullivan

You can't use dbOpenTable on a linked table. You can use dbOpenDynaset. If
you leave the argument out, Access will use dbOpenTable on the local table
and dbOpenDynaset on the linked table.

HTH,

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top