DBGrid Problem 
Author Message
 DBGrid Problem

I a junior programmer and newbie in VB. First I using DBGrid bounded. I have a
problem trying to save a current time to a column in the last record in the
grid.
A user(worker making  inputs in a time sheet) type a function number
automatically appear Start_Time in a column of that particular row(record).  
My problem start trying to find a event to write codes for my Finish_Time that
should be triggered when he/she intend to insert a new record(row) in the
DBGrid.
I used:
Private Sub DBGrid1_AfterUpdate()
If DBGrid1.Columns(5).Value = "" Then
DBGrid1.Columns(5).Value = Time
End if
End Sub

Private Sub DBGrid1_BeforeInsert(Cancel As Integer)

'DBGrid1.Row = DBGrid1.Row - 1
        If DBGrid1.Columns(5).Value = "" Then
DBGrid1.Columns(5).Value = Time
End if
End Sub

And the same code in the AfterInsert event . Trying one at the time.
But all of then unfortunally didnt help me, because when I start to type in
the new row(record) I cant see the characters that I am typing, and the icon
with the pencil is pointing in the first record(row) in the code written in
the AfterUpdate or pointing to the previous record in the Before or
AfterInsert event.

Please Ill appreciate any help. Thank you very much.

Silver Soler



Wed, 27 Oct 1999 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. DBGrid problem - difficult problem

2. DBGrid - problem

3. DBGrid Problem

4. dbgrid problem

5. DBGrid Problem!!!

6. dbGrid problems...

7. DBgrid problem

8. FRUSTRATING DBGrid problem...

9. DBGrid: Problem with cancelling BeforeUpdate event

10. Dbgrid problems

11. DBgrid problems


 
Powered by phpBB® Forum Software