Forms: turning "on and off" fields on a subform table using check boxes

J

jay23r

Hello all,

Help..
I'm trying to figure out a way on a form to uses check boxes to turn
"off and on" fields to diplay on a subform . Also to export what is on
the subform to excel.

These are the fields and check boxes I have.
-name
-address
-city
-state
-zip


So what I want is that if I check any of those fields listed, it will
show on the subform table.

Does anyone have a example or know a source to find out how to do it.

Thanks,
J.R.
(e-mail address removed)
 
R

Ron2006

1) If the subform is in datasheet view and you want the fields to be
visible or not, the only way is to actually have a different subform
for each of the posible combinations and change the subform based on a
test of the check boxes.

2) If the subform is a datasheet view and you can live with enabled
then you can use conditional formating.

3) If the subform is single or continuous forms than you can use active
code in the oncurrent event to make the field visible or not.
me.addressline.visible = Forms![Main Form Name]![Address Line
Check Box]
etc.

4) Off the top of my head I cannnot think of anyway of controlling the
export except through either dynamically creating the sql and using
that to do a transferspreadsheet. Or having created multiple queries to
cover all combinations and deciding which one to use when the export
button is pushed.

Ron
 

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