dynamically change sub form (using code) on button click...

P

Philip

Hi,

I have a form and the subform allows users to view data or modify data in
the table.

But for adding new records, I want a simplified view of the table, with only
therequired columns to be shown in the sub-form.

How can I either change the subform to be opened when the user clicks 'Add
New' or hide all the fields that are optional?

thanks

Philip
 
C

Curis

You can change the form serving as the SourceObject of the subform easily
enough by including :

Me.MySubForm.SourceObject = "frmMySubForm"

in the OnClick event of the "Add New" command button on the main form.

-Jeff
 
Top