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

Best way to let users run SQL?

P: n/a
Is there any way to let users compose and run SQL from the Access interface?
If I create a new query from the Database Window, select Design View and
then View >> SQL View, I get a window from which I can compose and run SQL
queries. What I'd like to do is let users have the ability to run SQL
queries like this against imported tables.

I was thinking I could open the imported table in a form and have a textbox
in which SQL can be entered, and a button to run it.

Does Access have any built-in tools to do this kind of thing?

Thanks in advacne.
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

deko wrote:
Is there any way to let users compose and run SQL from the Access interface? If I create a new query from the Database Window, select Design View and then View >> SQL View, I get a window from which I can compose and run SQL queries. What I'd like to do is let users have the ability to run SQL queries like this against imported tables.

I was thinking I could open the imported table in a form and have a textbox in which SQL can be entered, and a button to run it.

Does Access have any built-in tools to do this kind of thing?

Thanks in advacne.


Yep.
Step 1. Go to bookstore.
Step 2. Find "Access [version] Developer's Handbook (volume I)"
Step 3. Pay for said book.
Step 4. use the code from the CD.
Step 5. Send Ken Getz & Co a thank you note for such great code.

In all seriousness, yes, it's possible. You could get the SQL
scratchpad from the book, and then you could slap a button on it that
prompts for a queryname and then saves the query. Just use
CreateQueryDef. Built-in tools for this? Umm... yeah, it's called the
QBE grid.

I almost suspect this whole post is a joke. You're not for real, are
you? I've read probably most of your posts, and I can't believe you
don't own a copy of the Developer Handbook already. Trust me - it's
$60 well spent. If you don't believe me, read the reviews. I mean,
why should you take my word for it? What do I know? Ask an MVP. At
least they can prove they know something. But if you do serious work
in Access, you're completely nuts (IMHO) not to own it. Save yourself
the trouble of reinventing the wheel.

Nov 13 '05 #2

P: n/a
> I almost suspect this whole post is a joke. You're not for real, are
you?


Look, chump, if you don't like my posts, don't read or reply to them. There
was nothing wrong with that question.
Nov 13 '05 #3

P: n/a
I generally train advanced users in basic relational database design
and queries (and sometimes reports) in a 1-3 day tutorial. I include
loads of exercise problems focusing on their database(s) so that they
can become familiar with it. I have them use the Access query designer
to create queries, just like I do. I may also create a simple but
separate user interface for them to use so that they don't clutter the
normal UI with their queries or accidentally change one of the existing
queries. In the separate UI, I also include a number of dialogs that
they can use with their queries plus a few other features. When they
get stuck, they e-mail me their SQL and I send them back the corrected
SQL with an explanation as to what went wrong.

In the long run, the users become self-sufficient and don't need to
call me for new queries, reports and other things. Many of them enjoy
the challenge of writing their own queries. The result is a win-win
for both myself and the users.

Bill E.
deko wrote:
Is there any way to let users compose and run SQL from the Access interface? If I create a new query from the Database Window, select Design View and then View >> SQL View, I get a window from which I can compose and run SQL queries. What I'd like to do is let users have the ability to run SQL queries like this against imported tables.

I was thinking I could open the imported table in a form and have a textbox in which SQL can be entered, and a button to run it.

Does Access have any built-in tools to do this kind of thing?

Thanks in advacne.


Nov 13 '05 #4

P: n/a
pi********@hotmail.com wrote:
But if you do serious work
in Access, you're completely nuts (IMHO) not to own it. Save yourself
the trouble of reinventing the wheel.


8)

I'm not sure what your problem is with the OP (I can't see his post) but
what you're saying, based on this post seems to be (Tongue firmly in
cheek!):

1) Everyone buy Kens book

2) Disband cdma!

8)

Are you sure you're not a sock puppet for Ken Getz? Hmmmmm

Just joking, BTW.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.