How to disallow additions in form

  • Thread starter Thread starter Fjordur
  • Start date Start date
F

Fjordur

Hi,
I have this VB code
Sub OuvreForm(..., destFormName As String, ...)
...
Forms(destFormName).AllowAdditions = False
DoCmd.OpenForm formName:=destFormName, WhereCondition:=strWhereCond
and I don't understand why the form keeps opening with the * navigation
button.
What am I missing?
 
Try swapping the order of the two lines.

DoCmd.OpenForm formName:=destFormName,
Forms(destFormName).AllowAdditions = False

I'm surprised that you didn't get an error when you attempt to set a
property of a form that is not yet open (unless it was already open?)
 
Thanks Sandra
:-)
Sandra Daigle said:
Try swapping the order of the two lines.

DoCmd.OpenForm formName:=destFormName,
Forms(destFormName).AllowAdditions = False

I'm surprised that you didn't get an error when you attempt to set a
property of a form that is not yet open (unless it was already open?)

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

Hi,
I have this VB code
Sub OuvreForm(..., destFormName As String, ...)
...
Forms(destFormName).AllowAdditions = False
DoCmd.OpenForm formName:=destFormName,
WhereCondition:=strWhereCond and I don't understand why the form
keeps opening with the * navigation button.
What am I missing?
 
Back
Top