主题:帮我解释一下这程序,谢谢!
Private Sub cmdOK_Click()
Dim sql As String
Dim rs As New ADODB.Recordset
binputFlag = False 这是什么意思?
Call checkInput
If binputFlag = True Then
If ichangeFlag = 1 Then
Call addCompany
Call addPerson
Call createNum
Call init
Else
sql = "select * from Company where ComName='" & Me.comComName.Text & "'"
Set rs = getRS(sql)
If rs.EOF = True Then
Call addCompany
End If
sql = "update Personal set ClientName='" & Me.textName & "',Gender='"
sql = sql & Me.comGender.Text & "',Age=" & Me.textAge
sql = sql & ",Company='" & Me.comComName.Text
sql = sql & "',CPosition='" & Me.textPosition & "',Address='" & Me.textAddress
sql = sql & "',Code='" & Me.textCode & "',Tel='" & Me.textPerTel
sql = sql & "',MobileTel='" & Me.textMobileTel & "',FaxNumber='"
sql = sql & Me.textPerFax & "',Email='" & Me.textEmail & "'"从上sq1到下sq1`的这一段是什么意思?
If Me.textBirthday <> "" Then
sql = sql & ",Birthday=#" & Me.textBirthday & "#"
End If
sql = sql & " where ClientID='" & Me.textClientID & "'"
Call TransactSQL(sql) '修改个人信息
MsgBox "已经修改客户信息!", vbOKOnly + vbExclamation, "提示"
Unload Me
sql = "select * from Personal where ClientID='" & Me.textClientID & "'"
Call frmPerResult.showTopic '显示结果
Call frmPerResult.showData(sql)
frmPerResult.ZOrder 0
End If
End If
End Sub
Dim sql As String
Dim rs As New ADODB.Recordset
binputFlag = False 这是什么意思?
Call checkInput
If binputFlag = True Then
If ichangeFlag = 1 Then
Call addCompany
Call addPerson
Call createNum
Call init
Else
sql = "select * from Company where ComName='" & Me.comComName.Text & "'"
Set rs = getRS(sql)
If rs.EOF = True Then
Call addCompany
End If
sql = "update Personal set ClientName='" & Me.textName & "',Gender='"
sql = sql & Me.comGender.Text & "',Age=" & Me.textAge
sql = sql & ",Company='" & Me.comComName.Text
sql = sql & "',CPosition='" & Me.textPosition & "',Address='" & Me.textAddress
sql = sql & "',Code='" & Me.textCode & "',Tel='" & Me.textPerTel
sql = sql & "',MobileTel='" & Me.textMobileTel & "',FaxNumber='"
sql = sql & Me.textPerFax & "',Email='" & Me.textEmail & "'"从上sq1到下sq1`的这一段是什么意思?
If Me.textBirthday <> "" Then
sql = sql & ",Birthday=#" & Me.textBirthday & "#"
End If
sql = sql & " where ClientID='" & Me.textClientID & "'"
Call TransactSQL(sql) '修改个人信息
MsgBox "已经修改客户信息!", vbOKOnly + vbExclamation, "提示"
Unload Me
sql = "select * from Personal where ClientID='" & Me.textClientID & "'"
Call frmPerResult.showTopic '显示结果
Call frmPerResult.showData(sql)
frmPerResult.ZOrder 0
End If
End If
End Sub