datagride & MS access ..Delet Row
hi all ,
i have daragride view connect to Access data base, my question is that, how i can delete a specific row when i click on it from datagride and database ????
this is a data grid ...
http://www.m5zn.com/uploads/2010/12/...la5l1x7okn.jpg
when i click in the spacific row i will get msg box of the clicked row ....
from this code
Code:
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
msgbox DataGrid1.Row ' the row number
msgbox DataGrid1.Columns(3).Text
End Sub
please help me out to delete a record when i click a specific row ??????
also how i can reuse a ID number in the database ??????
best regards
Re: datagride & MS access ..Delet Row
Download the code from the article, and take a look. Bound Controls are EVIL, in VB6.
As far as reusing a KEY, that's just plain BAD DESIGN. Keys are supposed to be unique. If you want to use something again, come up with another field along with the KEY
Re: datagride & MS access ..Delet Row
If by reusing an ID number, you mean being able to store a record with a previously used ID, which was deleted, AFAIK you can't if it is an Auto-Increment field. It would create problems if the ID refers to data in other tables anyway.
Is there some reason why you'd need or want the ID to never skip a value?