Private Sub cmdfind1_Click()
Dim strwh As String
strwh = "True"
If IsNull(Me.cbofindgr) = False Then
strwh = strwh & " and grid like '*" & Me.cbofindgr & "*'"
End If
Me.sub0.Form.Filter = strwh
Me.sub0.Form.FilterOn = True
End Sub
Private Sub cmdfind2_Click()
Dim strwh As String
strwh = "True"
If IsNull(Me.cbofindgr) = False Then
strwh = strwh & " and grid like '*" & Me.cbofindgr & "*'"
End If
Me.sub0.Form.RecordSource = "SELECT * FROM tblGSdengji WHERE " & strwh & " ORDER BY grid;"
End Sub