B
Barry
I have VBA code (below) to find the maximum date in a field, ([Date]), based
on the criteria that the field (WELL_ID) is equal to a combobox (Combo34),
triggered by the "On Click" event in a textbox, but currently it does
nothing. Can anyone help me QA what could be wrong with my code (below)?
Dim DateX As Date
Dim Msg
Private Sub Text54_Click()
On Error GoTo ErrorHandler
DateX = DMax("[Date]", "tblWellMaintenanceLogbook", "[WELL_ID]=" & Chr(34) &
Forms!frmWellMaintenance.Combo34 & Chr(34))
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
Resume ErrorHandlerExit
End Sub
on the criteria that the field (WELL_ID) is equal to a combobox (Combo34),
triggered by the "On Click" event in a textbox, but currently it does
nothing. Can anyone help me QA what could be wrong with my code (below)?
Dim DateX As Date
Dim Msg
Private Sub Text54_Click()
On Error GoTo ErrorHandler
DateX = DMax("[Date]", "tblWellMaintenanceLogbook", "[WELL_ID]=" & Chr(34) &
Forms!frmWellMaintenance.Combo34 & Chr(34))
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
Resume ErrorHandlerExit
End Sub