Any ideas

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hi

I have a number of check boxes say 12, that I potentiality need to be
displayed on Access 97 reports. However, I know that for each report only a
few of the potential 12 will be used on each report. As report space is at a
premium, I do not want to display 12 check boxes on each report with a good
number of the boxes displaying no useful data.

My first idea was to only make visible check boxes that represent useful
data (Tick).



But..how does one go about VBA coding so that only the check boxes that need
to be visible are grouped together one under each other?

So the effect on the report would gave the elusion of a grow shrink feature



Thanks in advance for your help

Dave
 
David said:
I have a number of check boxes say 12, that I potentiality need to be
displayed on Access 97 reports. However, I know that for each report only a
few of the potential 12 will be used on each report. As report space is at a
premium, I do not want to display 12 check boxes on each report with a good
number of the boxes displaying no useful data.

My first idea was to only make visible check boxes that represent useful
data (Tick).

But..how does one go about VBA coding so that only the check boxes that need
to be visible are grouped together one under each other?

So the effect on the report would gave the elusion of a grow shrink feature


Set the detail section's and each of the check box control's
CanShrink property to Yes.

Then, for each check box, add a line of code to the detail
section's Format event procedure:

Me.checkbox1.Visible = Me.checkbox1.Value
 
Hi Marsh
Thank you for the feedback.Just one point at this stage, I have found the
detail section's "CanShrink" property , but I can't find the check box
control "CanShrink" property (I can find it on test boxes). Could you advise
me how to set this in Access 97?
Thank you
 
Oh bleep! I knew that ;-)

Sorry for misleading you. I don't actually use a check box
control on reports so I wasn't thinking in the right
direction :-(

Instead of a check box, use a text box sized appropriately
small. Set its Font to WingDings or something that contains
a check mark character and the FontSize property as needed.
Now, set its Format property to ;C;"" where C is the check
mark character code in the chosen font. Actually, I just
use the Arial font and an X instead of a check mark, in
which case the format property is simply ;"X";""
 
Hi Marsh

Thanks for the clarification.

It looks like key problem now is how to code to give the ability to move the
text boxes that are visible under each other, as at the moment I have the
visible one, a gap, a visible one etc. As I said in my original post I am
looking at being able to group the visible boxes together, one under each
other.

Thank you for for your help on this issue.

Dave
 
Dave said:
It looks like key problem now is how to code to give the ability to move the
text boxes that are visible under each other, as at the moment I have the
visible one, a gap, a visible one etc. As I said in my original post I am
looking at being able to group the visible boxes together, one under each
other.


I don't understand, unless I'm still leading you in an
unintended direction. If you're now using text boxes
instead of check boxes, then just place them one under the
other with only a small amount of space between them. Then
use the usual CanShrink approach I posted earlier.
 
Hi
Thank you for getting back, I will have a good look at your suggested code
again tomorrow.

At the moment the textboxes are showing when checked (so that bit is working
fine) the gap is there because of the space taken up by the nonviable
textbox, even though each text box and the detail section is set to
CanShrink

All the best

Dave
 
If the space is not shrinking when you've made them
invisible, it's because there is one or more controls next
to the text boxes (perhaps an unattached label?).
 
Dave,

Like Marsh I'm a little unsure what the problem now is. If
it is the "blank space" between each of your checkboxes
accumulating and resulting in uneven spacing between
checked text boxes try this. Increase the height of
each "check textbox" so that it is touching the one above
(so shrinkage will remove all space between them) and set
the "top margin" property to bring the "X" into line with
the caption.

HTH,

Terry
 
Hi Marsh & Terry

Thank you both for you input, I have it working.

If I need a 2nd stack of textboxes next to the original one (I know that at
this stage it will react as per my previous post) is it possible to use the
multiple column feature, so that I can prevent this type of interaction and
then revert back to the original formatting under say the two columns.

Thank you for your time.
 
As long as the detail secion's design is one control above
the other, then shrink will do what you want, regardless of
how many report columns you use.

If the detail section's design has multiple controls (not
counting attached labels) in the same horizontal band, then
the section's CanShrink can only work if all the controls in
the horizontal band shrink.
 
Back
Top