Using AllowAdditions and AllowDeletions in a subform datasheet



I use AllowAdditions and AllowDeletions to implement security in my forms.
That works just fine in form view. However, I allow the user to switch
between form and datasheet view.

The problem comes in a combination of a subform and datasheet view. When
switched to datasheet the coding (in form_current) tries to set the
AllowAdditions and AllowDeletions. I get the error:

Run-time error '2455':

You entered an expression that has an invalid reference to the property

The specific line in error is:

TAndPComments.Form.AllowDeletions = False

where TAndPComments is a subform. Again, this problem only occurs if the
user is in datasheet view. The subform is visible by clicking the "+" to the
left of the main form record in datasheet view.

Any suggestions? Thanks.


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