[AccessD] How to Change Font Color after Link is Clicked on Access 2007 Report

Bill Benson bensonforums at gmail.com
Wed Oct 14 21:24:34 CDT 2015


Brad, just playing with Current event, for the report, this seemed to
produce a reveolving color scheme. It is imperfectly constructed, I was
just trying to see what it might do.


Private Sub Report_Current()
Static MyColorindex As Long
Dim ctrl As Control
    For Each ctrl In Controls
        If TypeName(ctrl) = "Textbox" Then
            Select Case MyColorindex
            Case Is = vbRed
                ctrl.ForeColor = vbRed
                MyColorindex = vbBlack
            Case Is = vbBlack
                ctrl.ForeColor = vbBlack
                MyColorindex = 5
            Case Is = vbBlue
                ctrl.ForeColor = vbBlue
                MyColorindex = vbRed
            Case Else
                MyColorindex = vbRed
            End Select
        End If
    Next

End Sub

On Wed, Oct 14, 2015 at 5:42 PM, Brad Marks <bradm at blackforestltd.com>
wrote:

> All,
>
> We have an Access report that displays Sales Orders.  If more order
> details are needed, a user can click on the Sales Order ID and a second
> report is shown with all of the order details.
>
> Recently, one of our users has asked if the color of the specific order
> that was selected could be changed so that they can more easily see which
> orders have been selected.
>
> This would be similar to how an internet browser works when the colors of
> links to "visited" sites are changed.
>
> Is there a way to change the font color for a specific detail item on one
> line of a report?
>
> Thanks,
>
> Brad
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list