G
gmazza via AccessMonster.com
Hey there,
Here's my routine, I'm getting no errors, yet the table is not being updated,
can anyone see anything wrong? EmployeeID is an autonumber and primary key in
the table.
Thanks in advance!
Public Sub OnActionButton(control As IRibbonControl)
On Error Resume Next
Dim sSql As String
Dim db As DAO.Database
Dim strTrial As String
Dim intEmployee As Integer
intEmployee = Forms!Employees!EmployeeID
strTrial = "Trial Approved"
Select Case control.Id
Case "cmdApproval"
If MsgBox("Are you sure you want to approve this trial?", _
vbYesNo + vbDefaultButton2, "Clinical Trial Approval") = vbNo Then
Else
sSql = "Update Employee " _
& "Set ApprovalComment = " & strTrial & " " _
& "Where EmployeeId = " & intEmployee & ";"
CurrentDb.Execute sSql, dbFailOnError
End If
End Select
Here's my routine, I'm getting no errors, yet the table is not being updated,
can anyone see anything wrong? EmployeeID is an autonumber and primary key in
the table.
Thanks in advance!
Public Sub OnActionButton(control As IRibbonControl)
On Error Resume Next
Dim sSql As String
Dim db As DAO.Database
Dim strTrial As String
Dim intEmployee As Integer
intEmployee = Forms!Employees!EmployeeID
strTrial = "Trial Approved"
Select Case control.Id
Case "cmdApproval"
If MsgBox("Are you sure you want to approve this trial?", _
vbYesNo + vbDefaultButton2, "Clinical Trial Approval") = vbNo Then
Else
sSql = "Update Employee " _
& "Set ApprovalComment = " & strTrial & " " _
& "Where EmployeeId = " & intEmployee & ";"
CurrentDb.Execute sSql, dbFailOnError
End If
End Select