Solved

MS ACCESS Global Variable Question

Posted on 1998-12-29
2
215 Views
Last Modified: 2008-03-06
How and where to create and assign a Global Variable as Criteria to a Query for searching. that the variable must be static for later use?
0
Comment
Question by:vkkleung
2 Comments
 
LVL 10

Accepted Solution

by:
brewdog earned 50 total points
ID: 1972231
If you need the variable to be global, declare it (using the Global keyword) in a general module. As far as the query criteria, it doesn't really matter what you're going to use the variable for -- if it's global, you can get to it from anywhere.

I'm a little confused as to the Static part of your question. Do you mean that you want the value stored in the variable to remain the same no matter where in your code you use it? Then, in the procedure where you are referencing the variable, simply put Static (variablename) at the top of the procedure.

Hope this helps.

brewdog
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6875637
GREETINGS!

This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.  Also in the Community Support link is a question on how experts can help, if they wish, on the cleaning of old and abandoned questions.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question