Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 5th, 2004, 06:33 PM
Friend of Wrox
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default Which Way Is Better?


I have been working with Access at home on my computer for quite some time now (I have Access 2000). My question is this, is it advisable to create a Queries Dialog Box form that wil serve as the list of queries that can be accessed with the help of Visual Basic for Applications code? Are there other ways to open queries without using macros?

Ben Horne
Madison Area Technical College - Truax
3550 Anderson Street
Madison, Wisconsin 53704-2599


"There are two kinds of people in the world: Those who claim to be Flash junkies and those who actually are Flash junkies"
Ben Horne
I don\'t want to sound like I haven\'t made any mistakes. I\'m confident I have.

Most likely using FireFox and concocting my next Macromedia Flash project
Snibworks Forums Moderator

Welcome to the New Age
Old February 1st, 2005, 12:17 PM
ru1 ru1 is offline
Authorized User
Join Date: Feb 2005
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Ben. You can run a query in an Eventprocedure using the following code:

Dim strDoc as String

strDoc = "<Place the Name of your query in here>"
DoCmd.OpenQuery stDocName, acNormal, acEdit

I hope this helps. Also, if you title all your queries with the prefix of "qry", your tables with "tbl", modules with "mod", macros with "mac" and reports with "rpt", you will be able to manage large amounts of objects in a database more successfully.


Old February 1st, 2005, 01:30 PM
Friend of Wrox
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

Are you really still using Macros at all?

And you can create a form within Access to list all your queries and give users the option of selecting one and opening it. But this is better with VBA.

Are you using VBA at all, or just macros? There is an Access VBA forum here.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.