conditional format

linp

Registered User.
Local time
Today, 15:48
Joined
Feb 25, 2008
Messages
13
I have a report based on a query, it is a column with a list of dates and a column with names ,these are occupancy dates .
is it possible to put conditional formatting on the first occurance of a name in the list so i can see at a glance when a dog arrives ?

1-1-08 mutt

2-1-08 mutt
2-1-08 bello

3-1-08 mutt
3-1-08 bello

Thanks, lin
 
What may be better is to Group the report based on the Dog's name and sort the Records (Ascending) by Date. It's tidier this way:

Dog 1 Name
Date1 DataA DataB
Date2 DataA DataB
Date3 DataA DataB

Dog 2 Name
Date1 DataA DataB
Date2 DataA DataB

Dog 3 Name
Date1 DataA DataB

Dog 4 Name
Date1 DataA DataB
Date2 DataA DataB
Date3 DataA DataB


etc.....
 
Gemma,

if you group it by date, how do you find the FIRST occurrance to highlight?
 
it was in repsonse to the 2 graphics posted by linp

he is grouping by dog, but REALLY wants grouping by DATE
 
it was in repsonse to the 2 graphics posted by linp

he is grouping by dog, but REALLY wants grouping by DATE

I am actually groupng by date, like the first link ,what i want ,if possible , is format the first dog occurance

Lin
 
sorry, ive looked more closely now, and i see what you are trying to do.

i think within code (probably the detail format event) you would have to perhaps store the dognames/reference numbers as you come across them, in an array. If the dog isnt in the array yet, then format this line before printing
 
sorry, ive looked more closely now, and i see what you are trying to do.

i think within code (probably the detail format event) you would have to perhaps store the dognames/reference numbers as you come across them, in an array. If the dog isnt in the array yet, then format this line before printing

This is way over my head !it is not that important though ,i have another query with just the arrival and departure dates ,i just wodered if it could be done easily.

thanks for helping out.

lin
 
i just wodered if it could be done easily.
Well, that's an easy question. NO, it can't. Gemma's way is probably the toughest, but even the easiest way is still pretty difficult... ;)
 
It would probably be much easier to play with if a sample Database is posted here with some table data and the report you have already developed.

.
 
its not too hard to manage the dognames

the pseudocode would be

Code:
dim dognamearray(100) as string 
{make it big enough to hold all dogs - although see below - a collection might be easier for this}

{then in the format event}
if not dogname_alreadyseen then
   this is a new one
   add dogname to dogarray or collection
   highlight this line
end if

{ie - test whether we have had this dogname before - this is the slowest bit of the process, - brute force way would be to check every array item and see if the name was in there - slicker way would be to add names,and maintain them in alphabetical order - you could probably use a collection rather than an array for this, thinking about it, which would automatically keep the names in order, and be easily dereferenced}
 
It would probably be much easier to play with if a sample Database is posted here with some table data and the report you have already developed.

.

Thank you for your responses , right now i am very busy ;as soon as i get some spare time i'll try to prepare a sample db to post.

Cheers ,Lin
 

Users who are viewing this thread

Back
Top Bottom