Jody
06-19-2001, 01:53 PM
My question is... I have a quick function for an input Box to retreive a Date. I
did this so I could use the same value though out a report with many sub-reports
in it. Here is the Function:
Public Function GetRptDate() As Date
varInput = InputBox("Enter Report Date", "Report Date")
If IsDate(varInput) = False Then
MsgBox "Invalid input", vbCritical
Exit Function
Else
'input is good
GetRptDate = CDate(varInput)
End If
End Function
Simple enough... Now when I put GetRptDate() in the criteria box of my cross-tab
query, it brings up the Input Box, accepts the date entered, but It will not
return to run the query. It asks me to enter the date over again in some loop. Am
I missing something? Any help would be greatly appreciated.
Thanks,
Jody
did this so I could use the same value though out a report with many sub-reports
in it. Here is the Function:
Public Function GetRptDate() As Date
varInput = InputBox("Enter Report Date", "Report Date")
If IsDate(varInput) = False Then
MsgBox "Invalid input", vbCritical
Exit Function
Else
'input is good
GetRptDate = CDate(varInput)
End If
End Function
Simple enough... Now when I put GetRptDate() in the criteria box of my cross-tab
query, it brings up the Input Box, accepts the date entered, but It will not
return to run the query. It asks me to enter the date over again in some loop. Am
I missing something? Any help would be greatly appreciated.
Thanks,
Jody