Changing Back Colour for Empty Fields

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

Is there a quick way of changing the background colour of ALL empty fields
on my form so they are easy to spot?

I can do it one by one but there are lots of them and it seems silly to
create so much code if there might be a beter way.

Thanks
 
Keith wrote on 03.06.2005 :
Is there a quick way of changing the background colour of ALL empty fields on
my form so they are easy to spot?

I can do it one by one but there are lots of them and it seems silly to
create so much code if there might be a beter way.

Thanks

Hi!

Have you thought along the lines of using conditional formatting (from
the
format menu), or looping the controls?

dim ctl as control
for each ctl in me.controls
if ctl.controltype = actextbox then
if trim$(ctl.value & "") = "" then
ctl.backcolor = vb<somecolor>
else
ctl.backcolor = vb<someothercolor>
end if
end if
next ctl
set ctl=nothing
 
Back
Top