DoCmd.RunCommand acCmdDeleteRecord
Me![cboEmployeeID].Requery
Me![cboClientProject].RowSource = “”
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox “Error No: “ & Err.Number _
& “; Description: “ & Err.Description
Resume ErrorHandlerExit
End Sub
The dialog form opened from the Send Timesheets to Excel button is shown in Figure 7.14.
FIGURE 7.14
A dialog form for reviewing this week’s timesheets.
The txtEmployeeID textbox on the datasheet subform on the dialog form has a DblClickevent
procedure, so you can double-click an employee name to open that timesheet for editing, if
necessary:
Private Sub txtEmployeeID_DblClick(Cancel As Integer)
On Error GoTo ErrorHandler
Dim lngID As Long
Dim strClientCode As String
Working with Excel Worksheets 7