A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access a query without opening Access



 
 
Thread Tools Display Modes
  #1  
Old January 8th, 2010, 11:11 PM posted to microsoft.public.access.queries
tired and confused
external usenet poster
 
Posts: 2
Default Access a query without opening Access

I have a db with several dozen queries. I need a non-technical person, who
is also not authorized to see all the info in the db, to run one query each
day.

Is there any way to launch a query without being in the query view of
Access? Or is there a way to have a single query in the query window whuch
has sub queries not visible or in another location?
  #4  
Old January 10th, 2010, 03:47 AM posted to microsoft.public.access.queries
VWP1
external usenet poster
 
Posts: 7
Default Access a query without opening Access

You can run a saved query through VBA behind a form, with the VBA either
containing the SQL instead of a saved query, or having the VBA run the saved
query. You can do this from a different form than the one with the delicate
information. If using Access 2007, you use the wizard and create a macro,
then convert the macro to VBA, if needed.

"John W. Vinson" wrote:

On Fri, 8 Jan 2010 15:11:01 -0800, Tired and Confused Tired and
wrote:

I have a db with several dozen queries. I need a non-technical person, who
is also not authorized to see all the info in the db, to run one query each
day.

Is there any way to launch a query without being in the query view of
Access? Or is there a way to have a single query in the query window whuch
has sub queries not visible or in another location?


One way is to create a Macro (let's call it RunIt) that has two lines: one to
use the RunQuery action to execute the query (which should not have any
parameters), and then a Quit action to close the database.

You can open Access using either a shortcut or Windows Secheduler with a
command line such as

"C:\Program Files\Office\Office12\msaccess.exe" "E:\path\mydb.mdb" /x RunIt

The /x switch causes Access to open running that macro.

--

John W. Vinson [MVP]
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.