Full Version: Runtime Error '0', Reserved error
UtterAccess Forums > Microsoft® Access > Access Forms
cielo
I am getting a msgbox reflecting the above error. It is as a result of this piece of code.
------------------------------
'Alerts if there if there is a date discrepancy between age and service attended.
If Forms!frmPeople!txtAge > 14 And Me.cmbServiceTitle.Column(1) = "Sunday School" _
FOr Forms!frmPeople!txtAge > 30 And Me.cmbServiceTitle.Column(1) = "Young Adults" _
Or Forms!frmPeople!txtAge > 19 And Me.cmbServiceTitle.Column(1) = "Youth church" Then
Me.lblServiceError.Visible = True
Else
Me.lblServiceError.Visible = False
----------------------------------
It is in the OnCurrent Event of the subform.
txtAge is a calculated field based on the differance between fldDOB and Date() on the main form 'frmPeople'.
cmbServiceTitle is in the subfrom.
Sometimes fldDOB is null, i.e. no date entered.
When the error occurs..
The form loads and displays the first record....
If I click the last record button (nav bar)........
Up pops the error.
Why is this happening
TIA
Alan
yvesdekort
Hi,
Try putting ( )'s so you get :
If ( ... and ....) or ( .... and ...) or (... and ...) then
...
else
...
end if
hth
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.