OnCurrent Form Event

  • Thread starter Thread starter Joe Williams
  • Start date Start date
J

Joe Williams

I have a sub that I would like ot run on the forms OnCurrent event that
takes values from the form's fields and does some math to display some
calculations.

My problem is that when I move to a new record, there are no values in those
fields yet so I get a number of errors, mostly dealing with null values.

Can I disable the OnCurrent event for new records only or is there another
way to make sure that these calculations happen on only records that have
been entered previously?

Thanks

joe
 
Joe said:
I have a sub that I would like ot run on the forms OnCurrent event that
takes values from the form's fields and does some math to display some
calculations.

My problem is that when I move to a new record, there are no values in those
fields yet so I get a number of errors, mostly dealing with null values.

Can I disable the OnCurrent event for new records only or is there another
way to make sure that these calculations happen on only records that have
been entered previously?


If Not Me.NewRecord Then
'do the math and set the values
End If
 
Back
Top