FWIW, and this is highly impure non-portable SQL, but you can create an access module and add Get and Set routines...
e.g.
dim MyVariable as string
function GetValue() as string
GetValue = MyVariable
end function
sub SetValue(ToWhat as string)
MyVariable = SetValue
end sub
Now, in your sql expression you can create
"Select * from [YourTable] WHERE [YourField] = '" & GetValue() & "';"
Of course, you will want to change the data types as needed; if you plan on dealing with nulls you may consider using the variant data type.