A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access querry



 
 
Thread Tools Display Modes
  #1  
Old January 17th, 2008, 09:06 PM posted to microsoft.public.access.queries
Belcredit
external usenet poster
 
Posts: 2
Default Access querry

How do I tell the querry that my criteria is in the value of a global verable
  #2  
Old January 17th, 2008, 10:36 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Access querry

On Thu, 17 Jan 2008 13:06:02 -0800, Belcredit
wrote:

How do I tell the querry that my criteria is in the value of a global verable


You can't, as stated. The JET database engine has no knowledge of VBA
constants or variables.

You'll need to create a dumb little function, GetVal, like

Public Function GetVal()
GetVal = glbMyGlobalVariable
End Function

and use

=GetVal()

as the criterion in your query.

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.