On my form I have a place for the user to enter a from date and an end date. I want to create another query based on the date the user enters -1 year. Below is the code I currently have to get the date from the form.
In my where clause I want the strFRMDATE and strTODATE to be equal to what the user enters -1 Year.
Can this be done and if so how?
Code:
If IsNull(Me.txtFRMDATE.Value) Then
MsgBox "You must specify a Start Date. Press OK and enter the Start Date"
Exit Sub
Else
strFRMDATE = ">=#" & Me.txtFRMDATE.Value & "# "
End If
If IsNull(Me.txtTODATE.Value) Then
MsgBox "You must specify a End Date. Press OK and enter the End Date"
Exit Sub
Else
strTODATE = "<=#" & Me.txtTODATE.Value & "# "
End If
In my where clause I want the strFRMDATE and strTODATE to be equal to what the user enters -1 Year.
Code:
"AND PROORD_M.ACT_DTE " & strFRMDATE & _
"AND PROORD_M.ACT_DTE " & strTODATE & _
Can this be done and if so how?