G
Guest
I want to put code to limit the number of records of subform. I mean I want
user to enter maximum 10 records in the subform. Once the 10 record is
entered, it will not allow any further entry/disable to new entry of that
particular record.
As advised earlier in the newsgroup, I tried the below code but it is not
working properly. For example In one of the record's subform I entered 10
records, the code worked and it disable more entry. But at the same time, it
effected to the other records also specially when I moved to a new record I
found the subform is not allowing to enter records.
The code is as follows :
Private Sub Form_Current()
If Me.RecordsetClone.RecordCount >= 10 Then
Me.AllowAdditions = False
Else
Me.AllowAdditions = True
End If
End Sub
Please correct my code, so that I can complete this.
Regards.
Irshad
user to enter maximum 10 records in the subform. Once the 10 record is
entered, it will not allow any further entry/disable to new entry of that
particular record.
As advised earlier in the newsgroup, I tried the below code but it is not
working properly. For example In one of the record's subform I entered 10
records, the code worked and it disable more entry. But at the same time, it
effected to the other records also specially when I moved to a new record I
found the subform is not allowing to enter records.
The code is as follows :
Private Sub Form_Current()
If Me.RecordsetClone.RecordCount >= 10 Then
Me.AllowAdditions = False
Else
Me.AllowAdditions = True
End If
End Sub
Please correct my code, so that I can complete this.
Regards.
Irshad