B
Bob Quintal
(e-mail address removed) wrote in
you are trying to reference PrintGC on form cmd
Forms!cmd!PrintGC.enabled = true
Since you are in the code module for the form, Forms!cmd! should be
replaced with Me!PrintGC.enabled = true
cmd.PrintGC isn't a valid Controlname, it cannot have a period. IfHi. I'm trying to write simple code on a subforms On Current
event to disable/enable a command button based on the value of a
text box. The textbox is formatted to currency. Here's a sample
of what I need but it's not working (I think because of the
currency).
if me.totalpurchase > 250 then
cmd.PrintGC.enabled = true
else
cmd.PrintGC.enabled = false
end if
Hope someone can help.
you are trying to reference PrintGC on form cmd
Forms!cmd!PrintGC.enabled = true
Since you are in the code module for the form, Forms!cmd! should be
replaced with Me!PrintGC.enabled = true