Variables exist only in the VBA environment. The only VBA items that are known to the Access and SQL name spaces are public functions. Add a function for each variable to the module containing the variables:
Module basMyUserIDÂÂ
Option Compare Database
‘ This is a public variable refering to user’s ID
Public lngMyUserID As Long
Public Function GetUserID()
       GetUserID = [...]
Entries from March 2006
MS Access Using Public Variables in Query
March 26th, 2006 · Comments Off · MS Access
Tags: