AllowAdditions - PLEASE HELP!
Mar 27, 2006
Hi,
I have a form "A" with a subform "B". The Subform allowadditions is set to no, however, I would like the user to click a button which is located on form "A if they like to add a record to the subform "B" but I keep getting an error!
The code for the button on form a is the following:
Forms!a!B.AllowAdditions = True
Thank you.
View Replies
Nov 1, 2004
Hi
I have a subform with several records entered. When a particular entry is made in the subform
eg. chocolatebiscuit
I want the subform to not allow any more entries - records in that particular subform
Is there a easy way to do this?
I have tried to do this by saying
Me.Form.allowadditions = false
Unfortunately this works on the whole form
and stops the next subform - belonging to the next main record
from adding a new record.
How do I restrict the new records in A particular subform?
I tried
Me.Form.allowadditions = true
on entering the subform
but it doesnt work every time.
Also i put on enter
if not chocolatebiscuit then
allow entries
but for new records it takes the last entry in the subform
which could be two records back in the main form
says yes there is a chocolatebiscuit
and will not allow a new record.
View 3 Replies
View Related
Jul 17, 2005
Hi,
Is it possible to add a new record thorough VBA (for a command button) with the AllowAdditions property set to false?
I only want new records created if this command button is pressed.
TIA!
View 8 Replies
View Related
Jun 12, 2014
I've got a main form (mainform1) and a subform (subform1). On the mainform, I have a listbox that is limits the user to choosing only 1 choice. The selected choice has an accompanied value - 1 through 6 - that is populated in a hidden textbox (txt1).
What I'm trying to do is to limit the number of records the user is allowed to populate based on the value in the textbox. I'm unable to reference the textbox value for some reason and i'm stuck. However, my code works when i enter an integer value, I.E.
Dim rst as object
Set rst = Me.RecordsetClone
If rst.RecordCount >= 2 Then
Me.AllowAdditions = False
The code that i currently got going to reference the textbox that doesn't work is
If rst.RecordCount >= Me.Parent!txt1 Then
Me.AllowAdditions = False
View 4 Replies
View Related