Access Reports and uses of Textboxes

  • Thread starter Thread starter Frank Bobak
  • Start date Start date
F

Frank Bobak

Realizing this is a basic question but I'm trying to
create a report using a textbox as a variable. The
variable is dependent upon a Select Case Statement. For
example Case 1 the countrolsource should be [ABC], case 2
the controlsource should be [DEF]. I get one of two
errors. "can't change the value" or "can't find the field
code"

If anyone has any suggestions I could use the help.

Thanks

Frank Bobak
 
Frank said:
Realizing this is a basic question but I'm trying to
create a report using a textbox as a variable. The
variable is dependent upon a Select Case Statement. For
example Case 1 the countrolsource should be [ABC], case 2
the controlsource should be [DEF]. I get one of two
errors. "can't change the value" or "can't find the field
code"

If anyone has any suggestions I could use the help.

Thanks

Frank Bobak

You cannot change the ControlSource of A TextBox once printing has started.
Either use an unbound TextBox and have code in the section format event plug
in the value...

Select Case (your test)
Case 1
Me.TextBoxName = Me![ABC]
Case 2
Me.TextBoxName = Me![DEF]
End Select

....or use the Switch() function as the ControlSource of the TextBox...

=Switch(SomeTest, [ABC], SomeOtherTest, [DEF])
 
Back
Top