[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MS ACCESS Global Variable Question

Posted on 1998-12-29
2
Medium Priority
?
225 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 200 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

829 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