Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old June 5th, 2004, 06:33 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Madison, Wisconsin, USA.
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default Which Way Is Better?

Hi,

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


-------------------------
http://community.webshots.com/user/valerian114

"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
  #2 (permalink)  
Old February 1st, 2005, 12:17 PM
ru1 ru1 is offline
Authorized User
 
Join Date: Feb 2005
Location: Detroit, MI, USA.
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Ru1

  #3 (permalink)  
Old February 1st, 2005, 01:30 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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.



mmcdonal






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