Garry's on the right track, though I'd go about it differently.
I'd make a recordset to check how many there are and run the code from the subform's BeforeInsert event. That means you don't have to store funny data, which might get changed or deleted at some point.
Also, in my example I set up a message to the user, instead of changing the allowAdditions property of the subform. Sort of arguable which is better. I suppose best would be to change the AllowAdditions and make visible some previously invisible text box on the main form that tells the user that no more records can be added to the subform.
In any case, here's the code I wrote:
Private Sub Form_BeforeInsert(Cancel As Integer)
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSql As String
Set db = CurrentDb
strSql = "SELECT Count(AccountID) as AccountCount " _
& " FROM tblAccount " _
& " WHERE BankID = " & Me.Parent!txtBankID
Set rst = db.OpenRecordset(strSql, dbOpenSnapshot)
If rst!accountcount > 7 Then
Call MsgBox("There are already 7 Banks for this " _
& "account. That's all that are allowed.", _
vbInformation, "Data Conflict"

Cancel = True
End If
End Sub =============
Jeremy Wallace
Designing and building Access databases since 1995.