UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Can Backthemecolorindex Be Used With Backtint?, Access 2016    
 
   
rmcgaffic
post Mar 18 2017, 11:49 AM
Post#1



Posts: 106
Joined: 18-June 06



BackTint is a control property that allows you to specify a percentage lighter or darker for a color.

The code below does not error out, and the form backcolor is set to Accent 1 (Index value of 4) but the color is not lightened by 50%.
I'm thinking that a form section is not a control, but I would like to apply the 50% lighter only to the detail section.
I know I can define another theme color such as Accent 2 to achieve the lighter color, but I would like to do this with code if
at all possible.

Can this be done?

Private Sub Command0_Click()
Dim o As Object
Dim i As Integer
For Each o In CurrentProject.AllForms
If o.Name <> Me.Name Then
DoCmd.OpenForm o.Name, acDesign, , , , acHidden
With Forms(o.Name)
.Detail.BackThemeColorIndex = 4
.Detail.BackTint = 50

End With
DoCmd.Close acForm, o.Name, acSaveYes
End If
Next o
End Sub


Go to the top of the page
 
rmcgaffic
post Mar 18 2017, 01:08 PM
Post#2



Posts: 106
Joined: 18-June 06



I found the problem:

The property to be set is NOT BackTint, it is BackShade.

This code behaves correctly:

.Detail.BackThemeColorIndex = 4
.Detail.BackShade = 50
Go to the top of the page
 
cheekybuddha
post Mar 18 2017, 02:22 PM
Post#3


UtterAccess VIP
Posts: 8,985
Joined: 6-December 03
From: Telegraph Hill


thumbup.gif

Nice! Thanks for sharing your solution.

d

--------------------


Regards,

David Marten
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    27th May 2017 - 11:48 PM