Allow Additions=No in form

tucker61

Registered User.
Local time
Today, 14:31
Joined
Jan 13, 2008
Messages
344
I have 2 buttons on my switchboard to open the same form, 1 in Form view, the 2nd in Datasheet view,
In form view I have custom buttons to add new records, with the code on the button me.allowadditions = true.
This works for me in form view, however when users want to use the datasheet view they cannot add new records.

Can i set allow additions to no, for the form view and to yes for the datasheet view?
 
1. I hate the built in switchboard as I find it too limiting.

2. If I was opening my form I would use my own code:

For the Single Form View:
DoCmd.OpenForm "MyFormNameHere", acViewNormal
Forms!MyFormNameHere.AllowAdditions = False

For the Datasheet View:
DoCmd.OpenForm "MyFormNameHere", acFormDS
Forms!MyFormNameHere.AllowAdditions = True
 
Thanks, makes sense, I will try tomorrow.

Regards
tucker61
 
And actually if you set the AllowAdditions to False as a default then you only have to do the extra code in one of the places :)
 

Users who are viewing this thread

Back
Top Bottom