J
John Ortt
Hi Everyone,
I have designed a form which successfully supresses the ability to create
new records by setting the AllowAdditions property to "No".
The problem is that when I open the form using the code below the form once
again allows additions and I can't figure out how to prevent this.
I tagged the "Me.AllowAdditions = False" into the openargs section but to no
avail.
If anyone can spot the problem in my code I would be very grateful.
Thanks,
John
******* Start Code *******
Private Sub cmdView_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmForm"
stLinkCriteria = "[strIndex]=" & Me.ctlIndex.Value
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit, ,
Me.AllowAdditions = False
End Sub
******** End Code ********
I have designed a form which successfully supresses the ability to create
new records by setting the AllowAdditions property to "No".
The problem is that when I open the form using the code below the form once
again allows additions and I can't figure out how to prevent this.
I tagged the "Me.AllowAdditions = False" into the openargs section but to no
avail.
If anyone can spot the problem in my code I would be very grateful.
Thanks,
John
******* Start Code *******
Private Sub cmdView_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmForm"
stLinkCriteria = "[strIndex]=" & Me.ctlIndex.Value
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit, ,
Me.AllowAdditions = False
End Sub
******** End Code ********