Hi,
I have a field on a form entitled "Current Printable NVA No" that I want to fill with a color when another field entitled "Sent to Mfg" is set to Yes. How do I do that in access?
Hi,
I have a field on a form entitled "Current Printable NVA No" that I want to fill with a color when another field entitled "Sent to Mfg" is set to Yes. How do I do that in access?
Use Expression Is and a condition like:
[Sent to Mfg] = True
Spaces in field names aren't worth the bother in the long run, most of us avoid them (symbols as well). FYI, I deleted your duplicate thread. Welcome to the site.
Thanks for the reponse. The "= True" statement doesn't work.
What is the data type of that field? I assumed it was Yes/No. You have to test for whatever is actually stored in that field. If it's text, perhaps:
[Sent to Mfg] = "Yes"
Do this: Create a Macro and use the if function, being the condition when "Sent to Mfg" is "Yes", then, within the if in the 'add new action' field write down SetProperty, then in 'Control name', put the name of the field which you want to change the color to, then in 'property' select BackColor and then in 'Value' introduce the Hex value. That should do it.
Let me know if this worked for you.
This worked, thanks! One more question - When I set the "Sent_to_Mfg" combo box to Yes, the color of the other field changes, but not until I hit refresh. How can I get it to change immediately?
I would expect Conditional Formatting to react as soon as the control is updated. It isn't? Can you attach the db here?
Yeah, it doesn't. What did you want to see? The Expression Is written as [Sent_to_Mfg]="Yes"
It only colors the box in question when the control "Sent_to_Mfg" is selected as Yes then I hit refresh. I should actually probably mention the Yes/No combo box's Row Source is qklp_YES_NO. Maybe that's why?
I wanted to be able to play with it. You can try this in the after update event of the combo:
Me.Refresh
Glad you got it working.