Avatar of stuckp1
stuckp1
 asked on

Access 2010 VBA: Looked all over but can't find straight answer for how to set color property of field using, #NNNNNN format

Background:

I have this VBA statement

Form_Storage_Automation_Main_Form.HBA1.BackColor = "#F8F8F8"

I'm getting a "Type Mismatch" error.

I've looked through many online blogs and forums without success. The approach above I got out of a VB example. Is there a difference in VBA?

I don't understand what even the type would be?

What would be the correct way to do this?
Microsoft ApplicationsMicrosoft OfficeMicrosoft Access

Avatar of undefined
Last Comment
stuckp1

8/22/2022 - Mon
Brian Pierce

get rid of the quotes
ASKER CERTIFIED SOLUTION
danishani

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
stuckp1

ASKER
The removal of quotes didn't work for me, but Daniel's example did work.
What also works is to use MSAccess
Form_Storage_Automation_Main_Form.Snapshot_Quantity.BackColor = 11908533

See http://www.endprod.com/colors/

Again, thanks to everyone.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck