Lost textboxes on report

  • Thread starter Thread starter Wylie
  • Start date Start date
W

Wylie

This is a silly problem. I've lost some textboxes on a very complex
report. The were hidden, shrunk, and shoved aside a long time ago and
now I can't find them. Any help on how to select these in the report
designer?

-wylie
 
:
This is a silly problem. I've lost some textboxes on a very
complex report. The were hidden, shrunk, and shoved aside a long
time ago and now I can't find them. Any help on how to select
these in the report designer?

Do you know their names? In the report designer in the upper left on
the report toolbar is a dropdown list with all the controls listed
in them.

You might also try some code like this after opening the report in
design view (where "MyProblemReport" is the name of your report):

Dim ctl As Control

For Each ctl In Reports("MyProblemReport")
If ctl.Width < 200 Then
ctl.Width = 1440
Debug.Print ctl.Name & " width changed"
ctl.BackColor = 255
End If
Next ctl
Set ctl = Nothing

If there are any other things you think might be causing problems,
you might check and change those properties, too.

Because of the problem you're encountering, for all hidden controls
(i.e., ones that aren't visible at runtime), I make them normal
width and use a distinctive background color (usually bright
yellow), so that I can tell at a glance in design view which
controls are hidden and which are not. I also tend to put them in
places that are out of the way, because overlapping controls can
slow down form/report display.
 
Write VBA code to run the Controls Collection in design view. Move any
controls that are outside the printable area back to the upper left hand
corner of the Section by setting their Left and Top properties, and make
them visible while you're at it. Then deal with them one by one in design
view (now, in Access 2010, more gradiosely named "backstage" --
whoop-tee-do!).
 
Do you know their names? In the report designer in the upper left on
the report toolbar is a dropdown list with all the controls listed
in them.

You might also try some code like this after opening the report in
design view (where "MyProblemReport" is the name of your report):

  Dim ctl As Control

  For Each ctl In Reports("MyProblemReport")
    If ctl.Width < 200 Then
       ctl.Width = 1440
       Debug.Print ctl.Name & " width changed"
       ctl.BackColor = 255
    End If
  Next ctl
  Set ctl = Nothing

If there are any other things you think might be causing problems,
you might check and change those properties, too.

Because of the problem you're encountering, for all hidden controls
(i.e., ones that aren't visible at runtime), I make them normal
width and use a distinctive background color (usually bright
yellow), so that I can tell at a glance in design view which
controls are hidden and which are not. I also tend to put them in
places that are out of the way, because overlapping controls can
slow down form/report display.

The dropdown list of the controls solved my problem. Never paid it
any attention before. Learn something new everyday.

Thanks!

-wylie
 
Back
Top