Private Sub Command1_Click()
strWhere = "1=0 "
If checkdel.Value = -1 Then
strWhere = strWhere & "OR DEL<>0"
End If
If checkbus.Value = -1 Then
strWhere = strWhere & "OR BUS<>0"
End If
If checkfarm.Value = -1 Then
strWhere = strWhere & "OR FARM<>0"
End If
If checkhouse.Value = -1 Then
strWhere = strWhere & "OR HOUSE<>0"
End If
DoCmd.OpenReport "MyReport", acViewPreview, , strWhere
End Sub
|