Aaron
I gather from your reply that you just want the ONE date to be highlighted in a different colour, rather than each indiv. date, as you featured the 1st soln. I wrote.
Well, how you get the ldSelected Date is up to you. It could be you ask the user to input a date, on the form, or select it programmatically from one of the dates in the table.
To input a date, create a field, give it InputMask like 99-99-9999 (I'm assuming, as you're in HK your dates would be British?), convert the field to a valid date by
ldSelectedDate = CTOD( yourdatefield)
HTH
Terry
>Thank you for your reply! Terry!
>
>With Thisform.grdYourGrid
> .SetAll( "DynamicBackColor", "IIF( DateField = ldSelectedDate, ;
> RGB( 0, 0, 255), RGB( 255, 255, 255))", "Column")
>Endwith
>
>
>My data like that,
>
>2004/10/1 Pencil
>2004/10/1 Pens
>2004/10/1 Rubber
>2004/10/2 Glue
>2004/10/3 Toy car
>.... and so on
>
>I would like to have same background color for same date... However, how can I set the IdSelecteddate?!
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.