Private Sub cmd_runQry_Click()
On Error GoTo Err_cmd_runQry_Click
Dim stDocName As String
stDocName = "F1"
'start time
QryStart.Caption = Format(Now, "HH:nn:ss") & "." & Right(Format(Timer, "#0.000"), 3)
DoCmd.OpenQuery stDocName, acNormal, acEdit
'finish time
QryFinish.Caption = Format(Now, "HH:nn:ss") & "." & Right(Format(Timer, "#0.000"), 3)
Exit_cmd_runQry_Click:
Exit Sub
Err_cmd_runQry_Click:
MsgBox Err.Description
Resume Exit_cmd_runQry_Click
End Sub
|