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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top