窗 口中的按扭如下的公式只能锁库存表的数据,而明细表的数据如果有多条记录只能锁住一条,公式该如何编写,以下是我写的公式,不知那有问题,请指教
With Tables("进库表")
If .Current IsNot Nothing Then
.Current.Locked = True
End If
End With
With Tables("进库明细表")
If .TopPosition > -1 Then '如果选定区域包括数据行
For i As Integer = .TopPosition To .BottomPosition
.Rows(i).Locked = True
Next
End If
End With