Hello, People,
I have a form which user enter date to query certain date fielname "EnterDate, with format/mask short date.
WHich is reference to Queries name" QryDateSent with a criteria
[Forms]![frmQuerysent]![EnterDate] on thefield name datesent. Somehow works okay when user enter ceratin date, but not sure how to code to query when dates are blank.
Private Sub Open_Click()
On Error GoTo Err_Open_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "maintblBankruptcy"
Me.Visible = False
stLinkCriteria = "[DateESent]=" & "#" & Me![EnterDate] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close , "frmQueryrecieved"
Exit_Open_Click:
Exit Sub
Err_Open_Click:
MsgBox Err.Description
Resume Exit_Open_Click
End Sub
I have a form which user enter date to query certain date fielname "EnterDate, with format/mask short date.
WHich is reference to Queries name" QryDateSent with a criteria
[Forms]![frmQuerysent]![EnterDate] on thefield name datesent. Somehow works okay when user enter ceratin date, but not sure how to code to query when dates are blank.
Private Sub Open_Click()
On Error GoTo Err_Open_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "maintblBankruptcy"
Me.Visible = False
stLinkCriteria = "[DateESent]=" & "#" & Me![EnterDate] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close , "frmQueryrecieved"
Exit_Open_Click:
Exit Sub
Err_Open_Click:
MsgBox Err.Description
Resume Exit_Open_Click
End Sub