判断一下呗。
If Tables("xxx").AllowEdit = True AndAlso Tables("xxx").Current IsNot Nothing AndAlso Tables("xxx").Current.Locked <> True Then
Forms("窗口1").Open
End If