|
-
December 14th, 2010, 05:08 AM
#1
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 ...

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
-
December 14th, 2010, 11:08 AM
#2
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
-
December 14th, 2010, 12:47 PM
#3
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?
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|