Hi
I have a module where I want to filter the results based on dates input by the user but the variable is not recognised can you tell me what I am doing wrong please?
Basically
Dim FiltStartDate As String
FiltStartDate = InputBox("Start Date?")
‘Error catch
If FiltStartDate = "" Then
MsgBox "You have not supplied any information"
End If
If IsDate(FiltStartDate) Then
FiltStartDate = Format(CDate(FiltStartDate), Date)
Else
MsgBox "This isn't a Date"
End If
Then I need to filter the data for my report to be greater than FiltStartDate using the line beow
Select ***
From ***
WHERE (((tbl_Bookings. Start_Date)>=FiltStartDate And ((tbl_Bookings.End_Date)<=FiltEndDate))) "
Through the debug I can see the information in FiltStartDate but access does not recognise it and keeps asking for FiltStartDate (I will be setting up the FiltEndDate when this works).
Thank you
I have a module where I want to filter the results based on dates input by the user but the variable is not recognised can you tell me what I am doing wrong please?
Basically
Dim FiltStartDate As String
FiltStartDate = InputBox("Start Date?")
‘Error catch
If FiltStartDate = "" Then
MsgBox "You have not supplied any information"
End If
If IsDate(FiltStartDate) Then
FiltStartDate = Format(CDate(FiltStartDate), Date)
Else
MsgBox "This isn't a Date"
End If
Then I need to filter the data for my report to be greater than FiltStartDate using the line beow
Select ***
From ***
WHERE (((tbl_Bookings. Start_Date)>=FiltStartDate And ((tbl_Bookings.End_Date)<=FiltEndDate))) "
Through the debug I can see the information in FiltStartDate but access does not recognise it and keeps asking for FiltStartDate (I will be setting up the FiltEndDate when this works).
Thank you