help with (IIF) in criteria

dan1dyoung

Registered User.
Local time
Today, 21:58
Joined
Apr 9, 2005
Messages
76
Just a little help needed now, and i can get back on track (great forum)

what i have done to solve a problem i can not seem to solve using the IIf function in the query is the Private Sub Custom1Checkbox_Click()
below (where the Custom1Checkbox is a "search any part of the field" option),


and use 2 query's with one having Like [Forms]![frmParts]![TxtFilter] & "*" (AllParts) and the other having Like "*" & [Forms]![frmParts]![TxtFilter] & "*" (AllParts1)

How can i put this in the criteria of the query, so i only need one query??????




Private Sub Custom1Checkbox_Click()

If Me.FrameOpt.Value = 4 Then

If Me.Custom1Checkbox = 0 Then
Me.LstFindings.RowSource = "AllParts"
DoCmd.GoToControl "TxtFilter"
Me.LstFindings.Requery

Else

If Me.Custom1Checkbox = -1 Then

Me.LstFindings.RowSource = "AllParts1"
DoCmd.GoToControl "TxtFilter"
Me.LstFindings.Requery

End If
End If
End If

End Sub

Thanks

Dan
 

Users who are viewing this thread

Back
Top Bottom