Solved

MS ACCESS Global Variable Question

Posted on 1998-12-29
2
216 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

856 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