Check Box to view or not view fields

  • Thread starter croth68 via AccessMonster.com
  • Start date
C

croth68 via AccessMonster.com

I am using a continuous Form which I can print to a report for data viewing.
There is alot of fields on the report and I would like to be able to select
what fields I want to see in the report mainly but can also tie the check
boxes to the form. I have figured out the code to Hide a field from the
continuous form however it still shows up in the report. The table in the
continuous form has a large empty spot after hiding the field I am also
trying to figure out how to make the next field slide over where the hidden
field is so there is not an empty spot. Below is the code I wrote to hide the
field, any help would be appreciated.

Private Sub Check83_Click()
If Check83 = True Then
Me.Dealer_ID.Visible = False
Me.Dealer_ID_Label.Visible = False
'Me.Dealer_Name.CanGrow = True
'Me.Dealer_Name_Label.Can = True
Else
Me.Dealer_ID.Visible = True
Me.Dealer_ID_Label.Visible = True
'Me.Dealer_Name.CanShrink = True
'Me.Dealer_Name_Label.CanShrink = True
End If
 
G

Golfinray

As to the second part of your question, try using can shrink and can grow set
to yes. This will allow the form to change size when one part is showing or
one part is not. I don't quite understand what you mean by "tie the check
boxes to the form." If you mean link them to the form, it will be much easier
to use combo boxes or something that is very easy to link to your main form.
 
C

croth68 via AccessMonster.com

I set all the fields in the continous part (Details section) to yes for can
grow and can shrink. I also tried setting them to yes in the report as well.
No luck getting the table to move the other fields in to fill the gap of the
one that I hid.

Sorry, what I wanted to do was to set the check box up so that when I click
it (checkmark in the box) the field would disappear from the form and the
report. When I click the check box again (no checkmark in the box) the field
reappears on the form and the report. So when I said tie together, link is
what I should have said.

The field disappearing and reappearing on the form would be nice just to give
a wysiwyg feel but not totally necessary. Because there is a large amount of
fields in my table I want to be able to select which fields I want to print
to a report. Hopefully this clears things up a bit.
As to the second part of your question, try using can shrink and can grow set
to yes. This will allow the form to change size when one part is showing or
one part is not. I don't quite understand what you mean by "tie the check
boxes to the form." If you mean link them to the form, it will be much easier
to use combo boxes or something that is very easy to link to your main form.
I am using a continuous Form which I can print to a report for data viewing.
There is alot of fields on the report and I would like to be able to select
[quoted text clipped - 18 lines]
'Me.Dealer_Name_Label.CanShrink = True
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

Top