Forum Discussion
Create a traffic light
- Sep 28, 2023
Hi,
1. Sure, how would the form know what's in the other form if it isn't open?
If you have to show the color with only the Projects form open then you have to either join the underlying tables with a query so that the Status value of Tools is reachable in the Projects form. Or if that's not possible, you have to store the value that triggers the color also in the Projects table.
It's not clear for me what you are describing in your points 2 and 3 or how the two forms or the underlying tables and values should be related to change the color.
BTW You've put the code into the form's After Update event procedure instead of the control's, but I think that would change nothing for your points 2+3.
Servus
Karl
****************
Access Forever
Access News
Access DevCon
Access-Entwickler-Konferenz AEK
Hello,
we're almost there, I think.
The solution of the expression to put in the conditional formatting works, but I noticed these "problems":
1- If I open only the project mask the colors are not displayed; if I later open also the tool mask then it displays them
2-Either using the F5 key or the VBA code to update the colors do not change
3-Scrolling through the project mask records, the color displayed is always the one for the first record (as if the colors of subsequent records are not read)
I do not exclude that I have made some mistakes. Below are some images to show you what I did.
Thanks
Hi,
1. Sure, how would the form know what's in the other form if it isn't open?
If you have to show the color with only the Projects form open then you have to either join the underlying tables with a query so that the Status value of Tools is reachable in the Projects form. Or if that's not possible, you have to store the value that triggers the color also in the Projects table.
It's not clear for me what you are describing in your points 2 and 3 or how the two forms or the underlying tables and values should be related to change the color.
BTW You've put the code into the form's After Update event procedure instead of the control's, but I think that would change nothing for your points 2+3.
Servus
Karl
****************
Access Forever
Access News
Access DevCon
Access-Entwickler-Konferenz AEK
- MarcoCoffeeSep 29, 2023Copper Contributor
Hello,
thank you very much for your help.In the end I had to join the two tables with a query and return the field I was interested in to the mask and then through conditional formatting I created my traffic light.
Exactly as you had explained to me.
Thank you very much again.