cabao_193 > 11-09-12, 12:08 PM
Xuân Thanh > 11-09-12, 12:20 PM
cabao_193 > 11-09-12, 05:34 PM
Noname > 11-09-12, 06:29 PM
Private Sub CommandButton01_Click()
Dim sql As String
Dim id As Integer
Dim LName As String
id = Me.StudentID.Value
LName = Me.txtStudentLastName.Value
If Not IsNull(LName) Then
sql = "INSERT INTO tblStudents ([StudentLastName]) VALUES ('" & LName & "') WHERE tblStudents.StudentID = " & id & ";"
CurrentDB.Execute (sql)
Else
MsgBox "Please enter the student's last name"
Exit Sub
End If
End Sub
tigergirl > 18-09-12, 01:38 PM
Xuân Thanh > 18-09-12, 02:35 PM