想做个数据库更新按钮,请高手指点:Private Sub Command_UPDATA_Click()Dim myval As StringIf Text1.Text = "" Or Combo1.Text = "" Then
        MsgBox "Please input Material Number.And Device Process Type"
    Else
        Set rs = cn.Execute("select * from MaterialNo WHERE  [MaterialNo]='" & Text1.Text & "'")
    If rs.EOF Then
        myval = MsgBox("Save New Material Number?", vbInformation + vbYesNoCancel, "Notice :")
            If myval = vbYes Then
                cn.Execute ("insert into MaterialNo values('" & Text1.Text & "','" & Combo1.Text & "')")
                MsgBox ("Add New Complete!")
                
                Adodc1.Refresh
                Call Command_Refresh_Click
            Else
                Text1.Text = ""
            End If
    Else
        Text1.Text = ""
        Combo1.Text = ""
    End If
End IfEnd Sub