Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2009
    Posts
    4

    Unanswered: Update An Oracle Record In Access...

    I'm trying to create a button in Access that will update a record in an Oracle database based on info that's filled into textboxes by the user. I've created "add", "delete", and "clear" buttons but I've never created an "update" button before. So, I really don't know how to code it. Here's what I've got so far. This is obviously not correct. Anyone know what I'm doing wrong?

    Private Sub btnUpdate_Click()
    Dim strSQL As String

    strSQL = "UPDATE HR_Employees (Employee_ID, First_Name, Last_Name, Email, Phone_Number, Hire_Date, Job_ID, Salary, Commission_Pct, Manager_ID, Department_ID)
    VALUES ('" & Me.txtEmployeeID & "','" & Me.txtFirstName & "','" & Me.txtLastName & "','" & Me.txtEMail & "','" & Me.txtPhoneNumber & "','" & Me.txtHireDate & "','" & Me.txtJobID & "','" & Me.txtSalary & "','" & Me.txtCommission & "','" & Me.txtManagerID & "','" & Me.txtDepartmentID & "');"

    DoCmd****nSQL strSQL

    End Sub
    Last edited by tiasholen; 12-08-09 at 19:10.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •