Delete record

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

Guest

Hi:

I have a query and a report based on it. Sometimes I have 2 records:

123 14 234 01/14/2005 7:12:48
123 0 0 01/14/2005 7:12:48

I would like to delete/not show in the report the second one when: the first
field is the same and the date/time is the same.

How do I do that?

Thanks,

Dan
 
One approach would be to get only the record you want from the query. If
you started out only looking for the first field and the date/time, how
would you/Access know which one of the two in your example NOT to use?
 
Hi Jeff:

Thanks!

The approach I am trying is:

Created a table and the date and time fields as Unique/No duplicates; but
when I append the records for one store=field1, sometimes appends the right
record and sometimes the record with zeros? (second one below)

123 14 234 01/14/2005 7:12:48 valid to show
123 0 0 01/14/2005 7:12:48 not to show
123 0 0 01/02/2005 7:12:53 valid to show

I do not want to delete the records with zeros but different date/time.

Does it help?

Thanks,

Dan
 
IF the record you want to HIDE is always 0 0 if another record exists. You
might try using a totals (group by query)

SELECT FirstField, Max(Field2), Max(Field3), Field4, Field5
FROM YourTable
GROUP BY FirstField, Field4, Field5

If there are more fields you need to show, you will have to give us more
details.
 
Back
Top