Wednesday, 7 March 2012

Creating a Customer Form using the Customer Class

The customer form shown on the left uses the customer class object given below to retrieve and update data in tables stored in a database.Option Explicit
Private Sub Command1_Click()
Dim clsCust As New clsCustomerOne
clsCust.CustomerID = Text1.Text
clsCust.CustomerName = Text2.Text
clsCust.CustomerAddress = Text3.Text
clsCust.CompanyName = Text4.Text
clsCust.CompanyAddress = Text5.Text
clsCust.PhoneNumberR = Text8.Text
clsCust.PhoneNumberM = Text9.Text
clsCust.RegistrationDate = Text6.Text
clsCust.RegistrationNumber = Text7.Text
clsCust.Customer_ID_Date = MonthView1.Value
clsCust.customer_update
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Call customer_ID_auto
Text1.Text = str
End Sub

No comments:

Post a Comment