Duane:
Sorry for being dense. But i am not sure if I understand. The text box
can
have one of three values, depending on product type. Each product type
has a
seperate sub report. So do I need some code like.
'Hide all sub forms
Me.sbrptOne.Visible = False
Me.sbrpttwo.Visible = False
Me.sbrptthree.Visible = False
If [TEXTBOX] = "TYPEA" Then
Me.sbrptOne.Visible = true
elseif [TEXTBOX] = "TYPEB" Then
Me.sbrpttwo.Visible = true
elseif [TEXTBOX] = "TYPEc" Then
Me.sbrptthree.Visible = true
Duane Hookom said:
You code would be in the format event of the same section as your
subreports.
Me.sbrptOne.Visible = Me.txtSomeTextBox = "SomeValue"
--
Duane Hookom
MS Access MVP
Reason I want to use tabs: I have a report that gives some data on
material
we produce. If the material is one type I also need to report some
other
data on teh same report, if the material is a second type I need to
report
different data. I use a tabcontrol in a form and show only the
relavent
tab
depending on the type of material I am collecting data on. I hoped I
could
do something similar for when I need to report the information, by
putting
the relavent sub report on each tab and showing or hiding the tabs as
needed.
Duane: i had not thought abut hiding and showing only selected sub
reports.
I am not sure how to do this based on the value of another control, in
this
case the contol would be text box in the report header that contains
material type, the sub reports are in the LOT footer. Can you give an
example? IT would be very much appreciated.
:
I can't imagine any reason to place a tab control on a report. You
might
want to use subreports. You can make some visible or invisible based
on
your
needs at runtime.
--
Duane Hookom
MS Access MVP
1st can you even put tab controls on a report? I have put the
control
on
the
report but when it runs it just shows a grey box were the control is
located.
Assuming that this is something easy to fix, can you use the same
code
as
for a form to display only selected tabs of the control when the
report
is
previewed or printed?