I have created a query and in the criteria I entered a function name:
=GetDate.
The code for get date is as follows:
Function GetDate()
Dim dtedteEntered As Date
Dim checking As String
dtedteEntered = Forms!frmMain.PeriodStartDate.Value
GetDate = "#" & dtedteEntered & "#"
End Function
When I run the query and type in the date it runs fine, but using this code it is returning nothing. I have seen this done before, but I am at a loss as to how to recreate it. Any ideas?
=GetDate.
The code for get date is as follows:
Function GetDate()
Dim dtedteEntered As Date
Dim checking As String
dtedteEntered = Forms!frmMain.PeriodStartDate.Value
GetDate = "#" & dtedteEntered & "#"
End Function
When I run the query and type in the date it runs fine, but using this code it is returning nothing. I have seen this done before, but I am at a loss as to how to recreate it. Any ideas?