有一个数据表,要求给定的数据不允许修改。但允许用户添加记录,并修改删除用户自己添加的记录。界面用datagrid,数据库用Access。有没有什么好方法?
谢谢

解决方案 »

  1.   

    那每條紀錄都要保存用戶名了
    set datagrid1.datasource=rs
    Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
            if rs.bof or rs.eof then exit sub         
            If DataGrid1.Columns("UserName").value = UserName Then
               DataGrid1.AllowUpdate True
            Else
               DataGrid1.AllowUpdate = True
            End If    
    End Sub
      

  2.   

    to ukyoxh(我来学习) 
    我也是这样想的。看来只好这样了。