Show all results except a specified selection
Sorry but I am totally new to all of this.
I have been asked to amend an Access 2003 database (based on Microsofts Issue logging database) so that we can search by all current jobs. At the moment we can search for all jobs (showall) or specific ones (exact match). How can I ask that if the search status criteria is "Current" show all records except those with a "Finished" status?
The current script is shown below:
'If Status
If Nz(Me.Status) = "All" Then
'Add it to the predicate - showall
Else
'Add it to the predicate - exact match
strWhere = strWhere & " AND " & "Issues.Status = '" & Me.Status & "'"
End If
Hope this makes sense.
Re: Show all results except a specified selection
Quote:
Code:
'If Status
If Nz(Me.Status) = "All" Then
'Add it to the predicate - showall
Else
'Add it to the predicate - exact match
strWhere = strWhere & " AND " & "Issues.Status = '" & Me.Status & "'"
End If
change to a Frame (poss?)
option 1 of the frame -> All
option 2 of the frame -> Matches Status
option 3 of the frame -> Unfinished
code:
Code:
'---- for type 1 (show all) no filtere required!
select case fraChoice 'the name of the frame object
case 2
'---- show only those specified
strWhere = strWhere & " AND " & "Issues.Status = '" & Me.Status & "'"
case 3
'---- show unfinished only
strWhere = strWhere & " AND " & "Not (Issues.Status = 'Finished')"
'---- note the above assumes Finished is the text in the status
end select
Or you can use a variation and code to do the same.
Essentially the strWhere is the Where clause of the sql statement and you are requested either a sppecific status or one that is not finished.
Re: Show all results except a specified selection
Thank you very much. It worked perfectly.