Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Access

Can't run a query anymore

 
Jump to:  
 
John
PostPosted: Sun Sep 07, 2008 4:43 am    Post subject: Can't run a query anymore
       
Hi

Access 2000. I have started getting a 'Can not perform this action at this
time' error on the line;

DoCmd.OpenQuery "My Query"

This app is running on a windows network and this particular code has been
running fine on the same network for years. A few years back this problem
came on the same network on another DoCmd.OpenQuery at a different location
in the same app. The solution I used was to turn the query into a string and
run using CurrentDB.execute QuerySt. Ideally I would like to avoid this. Has
any one come across this problem and know the fix?

Thanks

Regards
 

 
Graham R Seach
PostPosted: Sun Sep 07, 2008 7:40 am    Post subject: Re: Can't run a query anymore
       
I don't know why a previously working query has sudenly stoped working, but
you haven't indicated what's changed on the target computer. If you believe
nothing's changed, then it's likely that a Windows Update is the culprit.

You don't need to turn the query into a VBA string. You can still use
db.Execute "My Query", but becaue of the massive performance hit incurred
using the CurrentDb function, you should limit its use. Perhaps either
create an object reference using Set db = CurrentDb (where multiple queries
are being executed), or DBEngine(0)(0) otherwise.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

"John" <info@nospam.infovis.co.uk> wrote in message
news:Om1TKULEJHA.4828@TK2MSFTNGP06.phx.gbl...
Quote:
Hi

Access 2000. I have started getting a 'Can not perform this action at this
time' error on the line;

DoCmd.OpenQuery "My Query"

This app is running on a windows network and this particular code has been
running fine on the same network for years. A few years back this problem
came on the same network on another DoCmd.OpenQuery at a different
location in the same app. The solution I used was to turn the query into a
string and run using CurrentDB.execute QuerySt. Ideally I would like to
avoid this. Has any one come across this problem and know the fix?

Thanks

Regards

 

 
Douglas J. Steele
PostPosted: Sun Sep 07, 2008 8:48 am    Post subject: Re: Can't run a query anymore
       
There is, of course, a significant difference between OpenQuery and Execute.
Execute can only be used with Action queries (UPDATE, INSERT INTO, DELETE).
OpenQuery can be used with Select queries (and, in my opinion, shouldn't be
used with Action queries).

--
Doug Steele, Microsoft Access MVP
LINK
(no private e-mails, please)


"Graham R Seach" <gseach@accessmvp_REMOVE.com> wrote in message
news:94FE613C-DE91-4C33-81A9-92D0AE949CF8@microsoft.com...
Quote:
I don't know why a previously working query has sudenly stoped working, but
you haven't indicated what's changed on the target computer. If you believe
nothing's changed, then it's likely that a Windows Update is the culprit.

You don't need to turn the query into a VBA string. You can still use
db.Execute "My Query", but becaue of the massive performance hit incurred
using the CurrentDb function, you should limit its use. Perhaps either
create an object reference using Set db = CurrentDb (where multiple
queries are being executed), or DBEngine(0)(0) otherwise.

"John" <info@nospam.infovis.co.uk> wrote in message
news:Om1TKULEJHA.4828@TK2MSFTNGP06.phx.gbl...
Hi

Access 2000. I have started getting a 'Can not perform this action at
this time' error on the line;

DoCmd.OpenQuery "My Query"

This app is running on a windows network and this particular code has
been running fine on the same network for years. A few years back this
problem came on the same network on another DoCmd.OpenQuery at a
different location in the same app. The solution I used was to turn the
query into a string and run using CurrentDB.execute QuerySt. Ideally I
would like to avoid this. Has any one come across this problem and know
the fix?
 

 
John
PostPosted: Sun Sep 07, 2008 2:44 pm    Post subject: Re: Can't run a query anymore
       
Hi Doug

This one is an action query.

Thanks all. I will use execute and see if it works at client's.

Regards

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:uIMbJdNEJHA.4040@TK2MSFTNGP02.phx.gbl...
Quote:
There is, of course, a significant difference between OpenQuery and
Execute. Execute can only be used with Action queries (UPDATE, INSERT
INTO, DELETE). OpenQuery can be used with Select queries (and, in my
opinion, shouldn't be used with Action queries).

--
Doug Steele, Microsoft Access MVP
LINK
(no private e-mails, please)


"Graham R Seach" <gseach@accessmvp_REMOVE.com> wrote in message
news:94FE613C-DE91-4C33-81A9-92D0AE949CF8@microsoft.com...
I don't know why a previously working query has sudenly stoped working,
but you haven't indicated what's changed on the target computer. If you
believe nothing's changed, then it's likely that a Windows Update is the
culprit.

You don't need to turn the query into a VBA string. You can still use
db.Execute "My Query", but becaue of the massive performance hit incurred
using the CurrentDb function, you should limit its use. Perhaps either
create an object reference using Set db = CurrentDb (where multiple
queries are being executed), or DBEngine(0)(0) otherwise.

"John" <info@nospam.infovis.co.uk> wrote in message
news:Om1TKULEJHA.4828@TK2MSFTNGP06.phx.gbl...
Hi

Access 2000. I have started getting a 'Can not perform this action at
this time' error on the line;

DoCmd.OpenQuery "My Query"

This app is running on a windows network and this particular code has
been running fine on the same network for years. A few years back this
problem came on the same network on another DoCmd.OpenQuery at a
different location in the same app. The solution I used was to turn the
query into a string and run using CurrentDB.execute QuerySt. Ideally I
would like to avoid this. Has any one come across this problem and know
the fix?

 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

Fotka teksty piosenek bet365 gratka Księgowość