Hello all,
i have a button that need to open a new form but first it should search between two spacific dates (entered by the user through two text boxes). it always gives an "miss match error"
here is the code of the button:
*****************************************************
Private Sub Command101_Click()
On Error GoTo Err_Command101_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "view_sent_memo"
stLinkCriteria = "[date]=" & "#" & Me![Text3] & "#" And "[date]=" & "#" & Me![Text115] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command101_Click:
Exit Sub
Err_Command101_Click:
MsgBox Err.Description
Resume Exit_Command101_Click
End Sub
****************************************
how can i link the stLinkCriteria to two dates ? to get the information needed between those two dates?
Thank you.
i have a button that need to open a new form but first it should search between two spacific dates (entered by the user through two text boxes). it always gives an "miss match error"
here is the code of the button:
*****************************************************
Private Sub Command101_Click()
On Error GoTo Err_Command101_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "view_sent_memo"
stLinkCriteria = "[date]=" & "#" & Me![Text3] & "#" And "[date]=" & "#" & Me![Text115] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command101_Click:
Exit Sub
Err_Command101_Click:
MsgBox Err.Description
Resume Exit_Command101_Click
End Sub
****************************************
how can i link the stLinkCriteria to two dates ? to get the information needed between those two dates?
Thank you.