Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if the cell of the datagrid is leave blank put the value 0 in it.

Status
Not open for further replies.

RSX02

Programmer
Joined
May 15, 2003
Messages
467
Location
CA
Hi
I have a datagrid in my form.
I would like to validate if the user let a cell blank, to put the value 0 in it. I tried many event but it seems that I can't find which one is the right one.
Thanks in advance
 
Many ways to do this.
One way is:

On the AfterInsert set the default values for all fields where you want ones. Then, on the BeforeColUpdate check the user's input value.

Another way would be to use the RowColChange event.

And yet another would be to declare your ADO recordset object variable in the declarations section using WithEvents and use the RecordWillChange event.
(If you are using the ADODC then you do not need to do the declaration as mentioned)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top