G
Guest
Hi,
I have some code that I would like to use over and over again.
The code is used in the WHERE part of a query. I may also apply this
principle to other code as well. It is quite long and used multiple times in
multiple forms and queries. I would therefore like to create a constant and
refer to that constant in my code.
My Question is: How do I create a constant like below, so that it is global
and can be used anywhere. That is, in any form or any module.
Example of how I would like to use it is below:
const0102 = "(((COMPANY_INFO.lic_grant)<#7/1/2002#) AND
((COMPANY_INFO.lic_sur) Is Null)) OR (((COMPANY_INFO.lic_grant)<#7/1/2002#)
AND ((COMPANY_INFO.lic_sur)>=#7/1/2001#))"
and then in the where clause of queries on various forms and reports use it
such as
SELECT * FROM COMPANY_INFO
WHERE const0102
Your assistance is appreciated.
I have some code that I would like to use over and over again.
The code is used in the WHERE part of a query. I may also apply this
principle to other code as well. It is quite long and used multiple times in
multiple forms and queries. I would therefore like to create a constant and
refer to that constant in my code.
My Question is: How do I create a constant like below, so that it is global
and can be used anywhere. That is, in any form or any module.
Example of how I would like to use it is below:
const0102 = "(((COMPANY_INFO.lic_grant)<#7/1/2002#) AND
((COMPANY_INFO.lic_sur) Is Null)) OR (((COMPANY_INFO.lic_grant)<#7/1/2002#)
AND ((COMPANY_INFO.lic_sur)>=#7/1/2001#))"
and then in the where clause of queries on various forms and reports use it
such as
SELECT * FROM COMPANY_INFO
WHERE const0102
Your assistance is appreciated.