Link to home
Start Free TrialLog in
Avatar of Lou Dufresne
Lou DufresneFlag for United States of America

asked on

Change SubForm to "Allowadditions"

I have a subform linked to the main form by a field "UniqueID". On the subform the User can click on the navigation buttons and create a new record without even knowing he did. To prevent this automatic new record creation from occurring I set the following:

                   I set the subform to AllowAdditions "NO" on the property sheet.
                   I then added a button using the wizard to Add a new record and as expected
                   it does not allow me to add a new record because AllowAdditions is set to "No".

In vba code how do I change the property of the subform from AllowAdditions "No" to AllowAdditions "yes" before I can add a nerw record.

If there is a better way to prevent the user from clicking on the navigation buttons and creating a new record wothout knowing he did, please advise me how to do this.   I will still need a "Add New Record Button" for the user to create a new record when he really wants to.

Lou
ASKER CERTIFIED SOLUTION
Avatar of shanesuebsahakarn
shanesuebsahakarn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial