Sub Forms

darno

Registered User.
Local time
Today, 21:43
Joined
May 25, 2005
Messages
67
Hi Folks,


I have a Form that contains 2 more sub forms, The main Form contains an ID No that makes each page unique. Both the subforms on main form are linked with this ID number, now my query is how is it possible to limit the 2nd form to have 5 rows of data input only. it should not exceed more than this. as soon as 5 rows are filled and the main form record pointer jumps to the new Record the 5 new blank rows should appear in the 2nd sub form.


Warm Regards,

Thanks


Darno
 
Put this code in the On Current of the Main form, change the names of the forms to suit your situlation.



Code:
Private Sub Form_Current()

If Me.[frmItemSubform].Form.RecordsetClone.RecordCount = 5 Then

Forms!frmMain!frmItemSubform.Form.AllowAdditions = False

Else

Forms!frmMain!frmItemSubform.Form.AllowAdditions = True


End If
 

Users who are viewing this thread

Back
Top Bottom