G Guest Jul 17, 2006 #1 I have a global var "G_NAME" I would like to use it in a query. Is it posible????????????????? Scott Burke
I have a global var "G_NAME" I would like to use it in a query. Is it posible????????????????? Scott Burke
G Guest Jul 17, 2006 #2 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
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