pass variable to criteria

G

Guest

Hi all,

Is there a way to do this? I've listed some of the code
I've set up for what I want to accomplish but I get error
messages.
 
J

John Viescas

You can do it with functions like this:

Public Function GetBeginDate() As Date
GetBeginDate = PassDate.BeginDate
End Function

Public Function GetEndDate() As Date
GetEndDate = PassDate.EndDate
End Function

BETWEEN GetBeginDate() And GetEndDate()

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
K

keith

Thank you. That worked. I had been attempting to pass
the variables via one function.
 
Top