Lou Dufresne
asked on
MS access 2007 Setting Backcolor ona label Field
I have a form that allows the user to click on a label field and some code runs.
I want to change the backcolor of the label field when the user clcks on it.
I am trying to use the folllowing code but continually get an error message:
DoCmd.SetProperty,"Applica tion Date Label",acPropertyBackColor , "#22B14C"
The syntax is not correct because I continue to get a message " Argument not Optional"
Question:
What is the correct Syntax?
Can this command be used on a label?
Thanks
Ldufresne
I want to change the backcolor of the label field when the user clcks on it.
I am trying to use the folllowing code but continually get an error message:
DoCmd.SetProperty,"Applica
The syntax is not correct because I continue to get a message " Argument not Optional"
Question:
What is the correct Syntax?
Can this command be used on a label?
Thanks
Ldufresne
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks everyone I used information from both of your suggestions to do what I wanted.
Ldufresne
Ldufresne
You accepted
me.labelName.backcolor="#2 2B14C"
as the answer, but by my tests in Access 2003 demonstrated that the back color property will not accept a string value - only a numerical or VB variable value. Can you explain how you 'used the information to do what you wanted.' for the benefit of any future readers of this string?
me.labelName.backcolor="#2
as the answer, but by my tests in Access 2003 demonstrated that the back color property will not accept a string value - only a numerical or VB variable value. Can you explain how you 'used the information to do what you wanted.' for the benefit of any future readers of this string?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ldufresne,
Click on the Request Attention to get the mod notified
Click on the Request Attention to get the mod notified
If http:#a32194102 had been originally accepted in lieu of http:#a32187407, we would not be having this conversation now. Thanks for setting it right.
ASKER
Thanks all. I appreciate everyones help always. You always provide me the framwork to create the solution that fits my issue. This is the best service for correct ansuers on the web. I have been a member for many years and prefer this service because the experts know the solutions to the questions.
I always profide enough points so that I can be as fair as possible with all experts who took the time to provide their input to my issue.
I thank you for your quick, direct and accurate answers to my questions which sometimes can be a little misleading.
Thanks again for the solutions you provide .
Ldufresne
I always profide enough points so that I can be as fair as possible with all experts who took the time to provide their input to my issue.
I thank you for your quick, direct and accurate answers to my questions which sometimes can be a little misleading.
Thanks again for the solutions you provide .
Ldufresne
me.labelName.backcolor="#2