Conditional Formating: Text Boxes, New Record

  • Thread starter Thread starter Paul-AZ-TX
  • Start date Start date
P

Paul-AZ-TX

Within a form, I have certain fields that need to be highlighted based upon
their value. I can check their value during the Load procedure for the form,
but if the record is advanced using the Record Navigator at the bottom of the
form, I do not think the code in the Load procedure will run. Is there a
"New Record" procedure or one that works when a new record is loaded into the
form?
 
Paul-AZ-TX said:
Within a form, I have certain fields that need to be highlighted based upon
their value. I can check their value during the Load procedure for the form,
but if the record is advanced using the Record Navigator at the bottom of the
form, I do not think the code in the Load procedure will run. Is there a
"New Record" procedure or one that works when a new record is loaded into the
form?


YOu may find the Format = Conditional Formatting menu item
easier to use and it is necessary if your form is display in
Continuous or Datasheet view.

To answer your specific question, use the Form's Current
event. To check for a new record, you can use:
If Me.NewRecord Then
'do something when navigating to a new records
End If
 
The Current event of the form will fire when the form opens and
every time you change records.
 
Back
Top