Form controlling on subform items

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi, I want to Know if there is any way to control the number of columns
shown
in a subform from the main form.
I have a form with a subform and a one-to-many ralationship. There is a
logical
flag (bounded to a checkbox) in the main form that controls the data shown
in the subform (a column in the subform). When the checkbox is checked the
column must enable-disable the appropreate column.

Thanks in advance, Chris
 
If you are viewing the subform in Datasheet view, you can
control what columns are being shown by changing the
SELECT statement in the form's Recordsource property. By
changing it the SQL text to include and exclude columns,
you can control what is show in the subform. This would
require a lot of programming to accommodate, because you
would need to keep track of which columns are presently
shown in the subform and which ones need to be shown or
hidden based on the checkboxes.
Of course, if you use the subform in Form view, then you
can just toggle the Visible property of a text box on the
subform when the corresponding checkbox is clicked on the
main form.
 
Hi:

This is actually easy if it's a datasheet; just use
the .ColumnHidden property

Perry
 

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

Similar Threads


Back
Top