R
RobGMiller
Access 2003.
Need to highlight the current record on a subform setup in continuous forms
view.
I found a way to do it a long time ago by setting the value of a control on
the main or parent form to the value of a LineNumber control on the current
record of the subform which is always a unique value. This is done in the
OnCurrent event of the subform. As you move through the records the OnCurrent
event fires and updates the Parentform control.
In Conditional formatting for a field that never gets the focus I change the
background color if Expression Is: Me!LineNumber = ParentForm!LineNumber or
somethign to that effect.
This worked perfectly until recently. If you clicked on a record or move to
it using the cursor(arrow) keys the background would change color. Now the
background color will only change color if a record is updated due to a
change in value of one of its controls.
I've made many changes to this application since this technique last worked.
None of which seems related to this type of thing. I though someone might
have some insight as to how the Conditional Formatting works. i.e. What
triggers the formatting of all the controls on a record when the record or
one of its controls gets the focus.
I am sure that no background code runs as different records get the focus
unless something is changed. I've tried repaint instead of refresh which was
used after the value of the ParentForm control is set from the OnCurrent
Event of the subform. Requery looses the focus alltogether so its useless in
this case.
RobGMiller
Need to highlight the current record on a subform setup in continuous forms
view.
I found a way to do it a long time ago by setting the value of a control on
the main or parent form to the value of a LineNumber control on the current
record of the subform which is always a unique value. This is done in the
OnCurrent event of the subform. As you move through the records the OnCurrent
event fires and updates the Parentform control.
In Conditional formatting for a field that never gets the focus I change the
background color if Expression Is: Me!LineNumber = ParentForm!LineNumber or
somethign to that effect.
This worked perfectly until recently. If you clicked on a record or move to
it using the cursor(arrow) keys the background would change color. Now the
background color will only change color if a record is updated due to a
change in value of one of its controls.
I've made many changes to this application since this technique last worked.
None of which seems related to this type of thing. I though someone might
have some insight as to how the Conditional Formatting works. i.e. What
triggers the formatting of all the controls on a record when the record or
one of its controls gets the focus.
I am sure that no background code runs as different records get the focus
unless something is changed. I've tried repaint instead of refresh which was
used after the value of the ParentForm control is set from the OnCurrent
Event of the subform. Requery looses the focus alltogether so its useless in
this case.
RobGMiller