Setting the CanGrow property via VBA

B

Brett Davis

Hello..

I am attempting to set a form's property CanGrow via VBA. However, when I
attempt to run the code I get the following error message:
Run-time error '2448':
You can't assign a value to this object

I am running the following code on the "on click" property of a button:
Forms!SDISwitchboardInFormReports.subfrmWindow.CanGrow = 0

I am using Access 2000.

Please advise...

Cheers!

Brett
 
F

fredg

Hello..

I am attempting to set a form's property CanGrow via VBA. However, when I
attempt to run the code I get the following error message:
Run-time error '2448':
You can't assign a value to this object

I am running the following code on the "on click" property of a button:
Forms!SDISwitchboardInFormReports.subfrmWindow.CanGrow = 0

I am using Access 2000.

Please advise...

Cheers!

Brett

1) That property most likely can only be set while the form is open in
Design View.

2) It really doesn't matter anyway, as CanGrow on a form control will
only work if the form is printed, not when the form is displayed.
Read Access help on the CanGrow property.
 
Top