If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Forms: turning "on and off" fields on a subform table using check boxes
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. |
#2
|
|||
|
|||
Forms: turning "on and off" fields on a subform table using check boxes
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 |
Thread Tools | |
Display Modes | |
|
|