G
Guest
Hi!
In my report, I want to change the control source of an unbound textbox
(Textbox3) depending of the value of 2 other text boxes (Textbox1 and
Textbox2). These last 2 are number fields from a query
If Me!Textbox1 >=Me!Textbox2
Me! Textbox3.controlsource = [Control1]
Else
Me!Textbox3.controlsource = [control2]
end if
i want to put whis code so that the controlsource will change depending of
the value but I don't know where to put it in my code. If I put it in
onFormat or onprint (in detail section), i get an error that says that
controlsource can't be changed after printing has started, if I put this in
onOpen event (in report), I get an error 2426, you entered an expression
that has no value
How can I make this work?
I'm using access 2000. I don't know if it changes anything but this report
is used as a subreport in another report
Thanks a lot
LouisPat
In my report, I want to change the control source of an unbound textbox
(Textbox3) depending of the value of 2 other text boxes (Textbox1 and
Textbox2). These last 2 are number fields from a query
If Me!Textbox1 >=Me!Textbox2
Me! Textbox3.controlsource = [Control1]
Else
Me!Textbox3.controlsource = [control2]
end if
i want to put whis code so that the controlsource will change depending of
the value but I don't know where to put it in my code. If I put it in
onFormat or onprint (in detail section), i get an error that says that
controlsource can't be changed after printing has started, if I put this in
onOpen event (in report), I get an error 2426, you entered an expression
that has no value
How can I make this work?
I'm using access 2000. I don't know if it changes anything but this report
is used as a subreport in another report
Thanks a lot
LouisPat