I am creating a help desk database.
I am creating a report to pull the tech's work he did within a date range.
The user runs the report and I prompt them for the tech's name and a date range with a form.
I have 3 global variables - Gl_Tech (string), Gl_BeginDate (date), Gl_EndDate (date).
I have the functions created and I am calling them in my query.
The Tech function works and the query & report show the tech's work. When I try to add the dates it doesn't pull.
I put a msg box in my function and it returns the expected date but it does not work. It is like the datatype is a string in the function but my field is a date datatype.
Any ideas?
I know I can put the prompt right in the criteria of the query but I would like to pull from the form. I also want to use these dates on the title of the report.
Here is my module code.
Option Compare Database
Global Gl_GetTech As String
Global Gl_BeginDate As Date
Global Gl_EndDate As Date
Public Function GetTech()
GetTech = Gl_GetTech
End Function
Public Function GetBeginDate()
BeginDate = Gl_BeginDate
MsgBox (BeginDate)
End Function
Public Function GetEndDate()
EndDate = Gl_EndDate
MsgBox (EndDate)
End Function
Thanks for any advice!
Jeff
I am creating a report to pull the tech's work he did within a date range.
The user runs the report and I prompt them for the tech's name and a date range with a form.
I have 3 global variables - Gl_Tech (string), Gl_BeginDate (date), Gl_EndDate (date).
I have the functions created and I am calling them in my query.
The Tech function works and the query & report show the tech's work. When I try to add the dates it doesn't pull.
I put a msg box in my function and it returns the expected date but it does not work. It is like the datatype is a string in the function but my field is a date datatype.
Any ideas?
I know I can put the prompt right in the criteria of the query but I would like to pull from the form. I also want to use these dates on the title of the report.
Here is my module code.
Option Compare Database
Global Gl_GetTech As String
Global Gl_BeginDate As Date
Global Gl_EndDate As Date
Public Function GetTech()
GetTech = Gl_GetTech
End Function
Public Function GetBeginDate()
BeginDate = Gl_BeginDate
MsgBox (BeginDate)
End Function
Public Function GetEndDate()
EndDate = Gl_EndDate
MsgBox (EndDate)
End Function
Thanks for any advice!
Jeff