Full Version: Highlight multiple fields on a tabular form based on value of one field
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
paddedcell
I have a tabular form that displays stock movements for different products. I would like to highlight an entire row red if a specific field displays an error message. I know that you can use conditional format to highlight a single field but the condition has to be related to that field only ie Field Value = error.

I thought I could get around this by creating a red rectangle the width of the the form but the height of the fields and had it placed behind the fields and the visiblity property set to FALSE. Then use the on current event procedure to set the rectangle visabilty to TRUE if the field displayed the error message.

The results sort of worked but failed miserably... first off, it only applied when the cursor was on the current record (obviously as it relied on the "on current" procedure) and the relavent field had the error message. However, the failure was that every record then displayed the red rectangle not just the current one.

I can use this principle on a report as I use the "On format" event but there appears to be no equivalent event for a form.

Any ideas would be truely greatful!!!

Si
theDBguy
Hi,

That's not true. You can apply Conditional Formatting to a control based on a value from another control.

Other than that, check out this previous thread.

Hope that helps...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.