Abdul,
Just in case you actually meant to say "variable"; you cannot refer to a
variable directly in SQL. The only way to refer to a variable is by using a
custom function. For example, if you have a variable called intMyVariable,
you'd have to create a function like so:
Public Function GiveMeMyVariable() As Integer
GiveMeMyVariable = intMyVariable
End Function
Then you can refer to the function in SL like so:
SELECT Field1, GiveMeMyVariable FROM myTable
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia