Ignore records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

MS Access 2002 SP-2
Windows XP Professional SP-2

Is there a way to have Access ignore records of a query result set if
particular conditions are met?

I was hoping to find a way of doing something along the lines of:

IIf(condition = true, ignore record, return record)

- assuming such a method exists -

I know the same effect can be reached via multiple queries, but doing it
this way would really help if anyone has any ideas...

Thanks,
Lou Sanderson
 
Sorry, but you're not giving enough details.

What do you mean by "ignore records"? Can you perhaps set a filter on your
form so that only records that match a particular criteria are displayed?
 
It's not really a matter of ignoring records. Rather it's using criteria that
identifies which records that you want. There are the Not and Not In clauses
plus a few others that you can use in sub-queries to limit the returned
records.

I don't think that an IIf statement will work.
 
Hi Lou,

What is your condition? If this is a Yes/No datatype, then simply put in a
criteria of =0 for false or <>0 for true.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

MS Access 2002 SP-2
Windows XP Professional SP-2

Is there a way to have Access ignore records of a query result set if
particular conditions are met?

I was hoping to find a way of doing something along the lines of:

IIf(condition = true, ignore record, return record)

- assuming such a method exists -

I know the same effect can be reached via multiple queries, but doing it
this way would really help if anyone has any ideas...

Thanks,
Lou Sanderson
 
Is there a way to have Access ignore records of a query result set if
particular conditions are met?

I was hoping to find a way of doing something along the lines of:

IIf(condition = true, ignore record, return record)

- assuming such a method exists -

I know the same effect can be reached via multiple queries, but doing it
this way would really help if anyone has any ideas...

That's what a query does, no? Just arrange your criteria so only the records
that meet the criteria are returned. Do you have a more specific example?

Tom Lake
 
I'm not familiar with forms, so I dont know about such a filter.

I'm using tables to build queries. My table contains information on an
event, and it has a field recording the time the event took place.

I am running a select query on this table - i'm only interested in a few
fields of the event which happened, but I'm using the totals function to
select the minimum time. Since its a totals query and my event fields have
'group by' the time which the query returns will vary depending on which and
how many of these event fields I bring in. The catch is I'd like to throw out
a record of my result set anything with a minimum time of 1. My problem is if
I put 'where time <>1' in the critera, it selects the minimum time other than
1 that event occured.

Thats not what I want, I want access to see that the time is one, and throw
away the whole record, not give me the next lowest time.

Hope that makes more sense...

-Lou
 
Aha! First create a query that throws out those records that you don't want
to see. Base your totals query on the first query.
 
Yes, it is. I was just curious as to the possibility of some jazzy
procedure/call I wasnt aware of...
 
Tom Lake said:
That's what a query does, no? Just arrange your criteria so only the
records
that meet the criteria are returned. Do you have a more specific example?

Tom Lake
 
Back
Top