Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Global Var in queries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott Burke - 17 Jul 2006 19:10 GMT
I have a global var "G_NAME"
I would like to use it in a query.

Is it posible?????????????????

Scott Burke
Ofer Cohen - 17 Jul 2006 19:48 GMT
Yes, by using a function that return the variabe

Function Get_G_NAME ()
  Get_G_NAME = G_NAME
End Function

Create the function in a module, and then you can use the function as
another field in the query or as a criteria

Select * From TableName Where FieldName = Get_G_NAME ()

Or
Select Get_G_NAME() As G_NAME, TableName.* From TableName
Signature

Good Luck
BS"D

> I have a global var "G_NAME"
> I would like to use it in a query.
>
> Is it posible?????????????????
>
> Scott Burke
Scott Burke - 17 Jul 2006 21:06 GMT
If it was any simpler...  It would be imposible to use.  :)

Thanks
Scott Burke

> Yes, by using a function that return the variabe
>
[quoted text clipped - 16 lines]
> >
> > Scott Burke
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.