hey my old bud!
i have a nice question for you
i wrote a small database using ms access. it has 3 coloums: id, count and fish
i want : in a specific row, if the third coloum > second col, the colour of row change to red...
i used a code in "DBGrid1DrawColumnCell", but when i want to add a new record, gets error.
(database : c:\db.mdb)
please help me.
I assume that the error is only happening when you have new record, right? I believe that error is caused by your effort to compare non-existent values. Remember that unless you have defined default values for your fields, they will initially be empty (null). Which is the case with your third and second column. So the error was caused by you comparing null value with another null value.
The best way to avoid this error is to give those columns default values of 0.