PDA

Click to See Complete Forum and Search --> : DBGrid -- show defaults


Renu
Oct 11th, 1999, 01:58 PM
Hello,
I have a DBGrid getting data from an Access Table.
I have three fields namely
ID -Autonumber
Date - present date

How can I show the defaults ie the ID which is an automumber and put in the present date for the date field once the user starts entering data into the dbgrid ??

Thanks in advance.
Renu

sushilD
Oct 13th, 1999, 12:24 AM
Hello There !

Try to use OnAddNew Event. It gets fired as soon as you press a key. Here you can move data to any column of newly added row by using columns collection like
DBGrid1.Columns(0)="10/13/1999"

Sushil D

Renu
Oct 13th, 1999, 08:52 AM
Hi,
Thanks for the reply. But it still does not solve my problem. Only after I type something and press enter does the "OnAddNew" is fired.

Any other solutions??
Thanks