If Option3.Value Then
If Text4.Text = "" Or Text5.Text = "" Or Len(Text4.Text) < 4 Then
MsgBox "请您完整填写查询时间!", vbOKOnly + vbInformation, "查询"
Exit Sub
End If
wherestr = wherestr + "出生日期 < '" & Text4.Text & "-" & Text5.Text & "-" & 1 & "'"
End If
If Option4.Value Then
If Text4.Text = "" Or Text5.Text = "" Or Len(Text4.Text) < 4 Then
MsgBox "请您完整填写查询时间!", vbOKOnly + vbInformation, "查询"
Exit Sub
Else
wherestr = wherestr + "出生日期 >'" & Trim$(Text4.Text) & "-" & Trim$(Text5.Text) & "-" & 31 & "'"
End If
End If
If Option5.Value Then
If Text4.Text = " " Or Text5.Text = " " Or Text8.Text = "" Or Text9.Text = "" Or Len(Text4.Text) < 4 Or Len(Text8.Text) < 4 Then
MsgBox "请您完整填写查询时间!", vbOKOnly + vbInformation, "查询"
Exit Sub
Else
wherestr = wherestr + "出生日期 Between '" & Text4.Text & "-" & Text5.Text & "-" & 1 & "' And '" & Text8.Text & "-" & Text9.Text & "-" & 1 & "'"
End If
End If