扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
Public Property Get CustomerID() As String CustomerID = rs("CustomerID") End Property Public Property Let CustomerID(NewValue As String) rs("CustomerID") = NewValue End Property |
ObjectName.CustomerID = "HALFI" |
ObjectName.CustomerID = "HALFISTORE" |
Public Property Get CustomerID() As String CustomerID = rs("CustomerID") End Property Public Property Let CustomerID(NewValue As String) 'If the length of NewValue is greater than five If Len(NewValue) > 5 Then '... then raise an error to the program 'using this class Err.Raise vbObjectError + 1, "CustomerID", _"Customer ID can only be up to five " & _"characters long!" Else '... otherwise, change the field value rs("CustomerID") = NewValue End If End Property |
Public Sub Update() rs.Update End Sub |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。