Setting form control forecolor programmatically

K

Ken Warthen

In Access 2007 VBA how would I set the value for the forecolor of a control
to the equivalent of the color represented by #204D89?

Me.MyControl.ForeColor = ?

Ken Warthen
(e-mail address removed)
 
B

Boyd Trimmell aka HiTechCoach via AccessMonster.co

Try

Me.MyControl.ForeColor = 8998176

Ken said:
In Access 2007 VBA how would I set the value for the forecolor of a control
to the equivalent of the color represented by #204D89?

Me.MyControl.ForeColor = ?

Ken Warthen
(e-mail address removed)
 
K

Ken Warthen

Boyd,

Thanks for the help. That certainly appears to be the correct color. Can
you tell me how you determined the numeric equivalent value of #204D89?

Ken
 
D

Douglas J. Steele

You can also go the other way, should you need to:

?Hex(8998176 And 255)
20
?Hex(8998176\ 256 And 255)
4D
?Hex(8998176 \ (256&*256&) And 255)
89
 
B

Boyd Trimmell aka HiTechCoach via AccessMonster.co

Doug,

Thanks for jumping it.

Boyd
You can also go the other way, should you need to:

?Hex(8998176 And 255)
20
?Hex(8998176\ 256 And 255)
4D
?Hex(8998176 \ (256&*256&) And 255)
89
[quoted text clipped - 25 lines]
 

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