hello the when open form with date is null works okay but when enter date (Short Date) dd/mm/yyyy give me a form with blank fields, but If I enter the (reverse) MM/DD/YYYY works okay. Not sure how to fixed. IUser have to enter a format of date DD/MM/YYYY
I try format, validation rule, nothing works.
Field EnterDate is set to short date with input mask of 00/00/0000;0;_ on the frmQueryrecieved.
Private Sub Open_Click()
On Error GoTo Err_Open_Click
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(Me![EnterDate]) Then
stLinkCriteria = "[DateESent] Is Null"
Else
stLinkCriteria = "[DateESent]=" & "#" & Me![EnterDate] & "#"
End If
stDocName = "maintblBankruptcy"
[Forms]![maintblBankruptcy]!cmdfilter.Visible = True
Me.Visible = False
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 try format, validation rule, nothing works.
Field EnterDate is set to short date with input mask of 00/00/0000;0;_ on the frmQueryrecieved.
Private Sub Open_Click()
On Error GoTo Err_Open_Click
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(Me![EnterDate]) Then
stLinkCriteria = "[DateESent] Is Null"
Else
stLinkCriteria = "[DateESent]=" & "#" & Me![EnterDate] & "#"
End If
stDocName = "maintblBankruptcy"
[Forms]![maintblBankruptcy]!cmdfilter.Visible = True
Me.Visible = False
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close , "frmQueryrecieved"
Exit_Open_Click:
Exit Sub
Err_Open_Click:
MsgBox Err.Description
Resume Exit_Open_Click
End Sub