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.