Full Version: Does disabling a control disable conditional formatting?
UtterAccess Forums > Microsoft® Access > Access Forms
istarion
Hello,
I was wondering if using VBA code to disable a control that has conditional formatting (that is, CF through the form interface, not through VBA) would prevent the actual conditional formatting expressions to be run/executed or read by Access. Basically, does disabling a control with CF also disable the CF expression from being read and run? I know it sounds stupid, but I just want to make sure. I need to save time and resources on form load, as I have over 300 controls with conditional formatting expressions on my form and I want to speed it up by disabling some controls not relevant to the user's current selection.
Thanks for any help,
Dave
freakazeud
Hi,
No...the conditional formatting should still apply...unless you formatted it within conditional formatting to be disabled.
HTH
Good luck
istarion
Thanks for your help. How do I disable conditional formatting, as opposed to just disabling the control, from within VBA code? Is that what you mean?
Thanks
freakazeud
No...conditionally formatting has an option to disable the control if the evaluation turns out true.
HTH
Good luck
istarion
ok, now i see that. However, the thing is, all of the 365 controls I have (each corresponds to a day of the year), will be true and will be colored either one of three colours depending on whether they are a start date, end date, or day between these two dates. So, all of them will need to be evaluated. What I want is only 30 of those controls to be shown at once (since a user will select only one month at a time), with the other 330 controls disabled and with their conditional formatting expressions NOT read/run at all. So, only 30 controls' conditional formatting expressions will be evaluated at one time. If the user selects another month, then another 30 controls only will be evaluated. Is this possible? Sorry if this is unclear, i'm still new to CF.
Thanks
freakazeud
Do you really need that many controls? Why can't you just use a max of 31 controls and dynamically assign them to be what you need?
HTH
Good luck
istarion
you're right, maybe if I were smarter. i tried every which way and it just wouldn't work out. i used to have 31 controls, but I remember having problems like crossing over from month to month. There were issues i couldn't work out. But so far, it works for me the way it is, it's just bloody slow. I'm looking for a way to speed it up and save some resources, if that's possible.
freakazeud
Aren't there samples that you could adapt in the archive e.g. here.
HTH
Good luck
istarion
thanks, i'll definitely check that out! sounds good.
freakazeud
You're welcome.
Good luck!
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.