uscctechnician
Technical User
I have a form, which has a sub form on it that allows me to enter in records for a table. What I would like to do, is max the amount of entries in this sub form to 10. I have a text box with the data source "=Count(CTN)" and it is accurate.
I added this into the sub form's On Current event:
If Me.Count > 9 Then Me.AllowAdditions = False Else Me.AllowAdditions = True
Thne problem I am having is that when I open my form and go to the tab with the sub form, the code will actually stop at 9. SO, for example, I open my form and go to the page with the sub form. It currently has 9 records on it. If I do NOT have the code in my form, the form will show me my 9 records and a blank line ready to accept the 10th record. When I put the code into the form, when I access the page with the sub form, it shows me my 9 records, no blank line to start a tenth record and no way to input the 10th record.
The Count(CTN) box shows 9 so I must be missing something.
Thank you all in advance!
I added this into the sub form's On Current event:
If Me.Count > 9 Then Me.AllowAdditions = False Else Me.AllowAdditions = True
Thne problem I am having is that when I open my form and go to the tab with the sub form, the code will actually stop at 9. SO, for example, I open my form and go to the page with the sub form. It currently has 9 records on it. If I do NOT have the code in my form, the form will show me my 9 records and a blank line ready to accept the 10th record. When I put the code into the form, when I access the page with the sub form, it shows me my 9 records, no blank line to start a tenth record and no way to input the 10th record.
The Count(CTN) box shows 9 so I must be missing something.
Thank you all in advance!