Hide/Show Option

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using A2K3

I have formated a report using an option group to either show or hide
columns. This works great. The last column on the page will show either
way, but is there a way to move it back to the left where I dont have any
blank space?

What I have tried is duplicating the column and setting it to visible no and
setting it where I want, this using tying it back to the option group. but
thaat didnt seem to help.

does anyone have any addtional suggestions are could point me to an example
i can pull from?

thanks
 
To resize the column, add some code to the Open event procedure of the
Report.

Set the Left and Width properties.
The numbers are in twips, where 1440 twips = 1 inch.
 
I was up late last night trying to figure this out, and after re-reading my
question I have including an example of what I would like to do.

So On Open I would put something like

Me.SubComm.Left = "1440"
Me.SubComm.Width = "1440"
OR 1440 x how many inches to the left/ width I want it to go?

What about the default values I already have? The show details option is
set where everything lines up the way I want to print. The hide details
remove 4 columns of information from the report, thus leaving me a huge gap
between the last field I want to show and the SubComm field. Do I leave the
default values the same?

Date|CustomerName|Crop|Policy|Premium|Rate|Comm|SubRate|SubComm

I would like to show/hide Premium, Rate, Comm, SubRate columns on the report
(everything is defaulted to visible = yes, and option is defaulted to show)
if hide details is chosen, then hide the fields mentioned and move SubComm to
the left where there is no gap between Policy and SubComm

Thanks for the reply
 
Yes, that's the idea, but without the quotes.

You can code this kind of thing:

Dim bHide As Boolean
If CurrentProject.AllForms("Form1").IsLoaded Then
If Forms!Form1!chkHide.Value Then
bHide = True
End If
End If

Me.Premium.Visible = Not bHide
'etc
If bHide Then
Me.SubComm.Left = Me.Premium.Left
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top