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

Runtime 2486 / Access 97 and A2K

P: n/a
I started to develop an application in Access 97 but have been
finishing it up in A2K. The code that I used in the 97 version worked
fine but I get a runtime 2486 error now in the 2000 version using the
same code. It appears to me that running the append query is what
causes the problem. I don't have a problem running the update query.

DoCmd.OpenQuery "MyUpdateQuery", acViewNormal, acEdit
DoCmd.OpenQuery "MyAppendQuery", acViewNormal, acEdit
DoCmd.Close acForm, "MyOpenForm"

When I looked this up on Google before someone had suggested using
DoEvents between the action queries but that didn't work.

The append query adds a record to a linked table (ODBC). The update
query is for a linked table (ODBC) also.

Any ideas?

Thanks for any help in advance...
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When I get errors like 2486 I usually compact the project, 'cuz it
sounds like a corruption problem not the real 2846 error.

You may want to use the Execute method of the db object instead of
OpenQuery for action queries: you can't Edit an Action query - there
are no resultsets returned. Try these:

CurrentDB.Execute "MyUpdateQuery", dbFailOnError
CurrentDB.Execute "MyAppendQuery", dbFailOnError
DoCmd.Close acForm, "MyOpenForm"

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQYHvEIechKqOuFEgEQJfSgCcCtlbNis+53nFck4QFoyQal eeOjgAoMaQ
/hVHVxzBkSpqIhT5p3gFBLsw
=nkel
-----END PGP SIGNATURE-----
Bob Gardner wrote:
I started to develop an application in Access 97 but have been
finishing it up in A2K. The code that I used in the 97 version worked
fine but I get a runtime 2486 error now in the 2000 version using the
same code. It appears to me that running the append query is what
causes the problem. I don't have a problem running the update query.

DoCmd.OpenQuery "MyUpdateQuery", acViewNormal, acEdit
DoCmd.OpenQuery "MyAppendQuery", acViewNormal, acEdit
DoCmd.Close acForm, "MyOpenForm"

When I looked this up on Google before someone had suggested using
DoEvents between the action queries but that didn't work.

The append query adds a record to a linked table (ODBC). The update
query is for a linked table (ODBC) also.


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.