Clear Fields

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

I have set up a form which has 2 price fields. One field
is Canadian $ and the other field is in USD. In my table I
am storing the Canadian $ value and the rate of exchange
used to calculate the USD value.

In my form everything diplays fine. When I go to add a new
record the values that were calculated, e.g. US$ values
stay on the form until I enter a new Candian $ value and
re-calculate.

How can I clear all fields on my form when saving and
adding a record.

THanks

Robert
 
How are you calculating the US$ values? If you use an expression in the
controlsource of the control it should clear for you when you go to a new
record. I would say that this would be the preferable way to show a
calculated value.

If instead, you are using an assignment statement with an unbound control
you can set it to null using the Current event of the form:

Private Sub Form_Current()
If Me.NewRecord Then
Me.txtUSDollars = Null
End If
End Sub
 
Back
Top