【UP1の続き】
If Me!キーワード <> "" Then
If filter = "" Then
filter = "A like '" & Me!キーワード & "'"
Else
filter = filter & " and A like '" & Me!キーワード & "'"
End If
End If
If Me!キーワード <> "" Then
If filter = "" Then
filter = "B like '" & Me!キーワード & "'"
Else
filter = filter & " and B like '" & Me!キーワード & "'"
End If
End If
If Me!C = True Then
If filter = "" Then
filter = "C like '" & Me!キーワード & "'"
Else
filter = filter & " and C like '" & Me!キーワード & "'"
End If
End If
If filter = "" Then
Me.FilterOn = False
Else
Debug.Print filter
Me.filter = filter
Me.FilterOn = True
Me.OrderBy = "対応日 ASC"
Me.OrderByOn = True
End If
End Sub
フィールドをABCの3つにしていますが実際は5つになります。宜しくお願い致します。