G
Guest
I am running this application in Access 97 and are plugging the start and end
dates from the date controls on a report menu (which are actual dates from a
table) into hidden controls on the MainMenu form. The 2 global function below
are to grab those values and use them to set parameters for the reporting
queries. However, I keep getting date variable values such as: 38621 and
38626! Is there a modification which can be made to this function to show and
actual dates, or should some sort of formatting be used? These functions DO
NOT set the parameter as expected. Please, check them and let me know if
changes are required to them and where? I am open to suggestions, too.
Public Function RetrieveStartDateKey() As date
If IsNull(Forms![frmMainMenu]![txtStartDate]) Then
RetrieveStartDateKey = 0
Else
RetrieveStartDateKey = Forms![frmMainMenu]![txtStartDate]
End If
End Function
'-------------
Public Function RetrieveEndDateKey() As Date
If IsNull(Forms![frmMainMenu]![txtEndDate]) Then
RetrieveEndDateKey = 0
Else
RetrieveEndDateKey = Forms![frmMainMenu]![txtEndDate]
End If
End Function
Thanks,
dates from the date controls on a report menu (which are actual dates from a
table) into hidden controls on the MainMenu form. The 2 global function below
are to grab those values and use them to set parameters for the reporting
queries. However, I keep getting date variable values such as: 38621 and
38626! Is there a modification which can be made to this function to show and
actual dates, or should some sort of formatting be used? These functions DO
NOT set the parameter as expected. Please, check them and let me know if
changes are required to them and where? I am open to suggestions, too.
Public Function RetrieveStartDateKey() As date
If IsNull(Forms![frmMainMenu]![txtStartDate]) Then
RetrieveStartDateKey = 0
Else
RetrieveStartDateKey = Forms![frmMainMenu]![txtStartDate]
End If
End Function
'-------------
Public Function RetrieveEndDateKey() As Date
If IsNull(Forms![frmMainMenu]![txtEndDate]) Then
RetrieveEndDateKey = 0
Else
RetrieveEndDateKey = Forms![frmMainMenu]![txtEndDate]
End If
End Function
Thanks,