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]
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.