Hi John,
Put the Me.
AllowAdditions = False line in the On Open argument of the form, rather than
in the sub of the code calling the form.

Signature
hth,
SusanV
> Hi Everyone,
>
[quoted text clipped - 28 lines]
>
> ******** End Code ********
John Ortt - 14 Mar 2007 16:18 GMT
Thanks for the reply Susan
I ended up trying Al's suggestion of removing the "acFormEdit " from the
string used to open the form and this worked perfectly.
My next point of call would have been your suggestion of adding the code to
the onopen event but it wasn't needed.
Thanks for taking the time to help.
All the best,
John
> Hi John,
>
[quoted text clipped - 33 lines]
>>
>> ******** End Code ********
SusanV - 14 Mar 2007 16:26 GMT
No problem, glad you got the answer you needed
;-D
> Thanks for the reply Susan
>
[quoted text clipped - 47 lines]
>>>
>>> ******** End Code ********
John,
If, in design mode, you set the AllowAdditions to NO, then there's no need to involve
AllowAdditions in the form opening code. The form will open with that property already
set, and will remain set until you change that property in the form code, or change the
design setting.
Also, the OpenArgs argument in the OpenForm method does not handle "code". It used to
pass a variable to the form.
And, it appears that the use of acFormEdit is overriding the form's AllowAdditions
setting.
Just try....
DoCmd.OpenForm stDocName,,, stLinkCriteria

Signature
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions
"Find a job that you love, and you'll never work a day in your life."
> Hi Everyone,
>
[quoted text clipped - 26 lines]
>
> ******** End Code ********
John Ortt - 14 Mar 2007 16:15 GMT
Cheers Al,
You were right, simply removing the "acFormEdit" from the string is allowing
it to work as intended.
Thank you very much.
John
> John,
> If, in design mode, you set the AllowAdditions to NO, then there's no
[quoted text clipped - 40 lines]
>>
>> ******** End Code ********