Conditional Formating: Text Boxes, New Record

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?
 
M

Marshall Barton

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
 
B

Beetle

The Current event of the form will fire when the form opens and
every time you change records.
 

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

Top