If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Record Count on Forms
Hi,
I have a Form (frmTeam) and a Sub Form (subfrmMember) and I wish to limit the number of records to four (4) for each Form Record. How do I get the Sub Form to count the number of Records? Thanking you in anticipation. Rayh |
#2
|
|||
|
|||
Record Count on Forms
One suggestion would be to modify your subForm's record source query to
select the last 4 records by date or some other field/value. Why the limit? Are you confusing display space with data structure issues? -Ed "Ray Hogan" wrote in message ... Hi, I have a Form (frmTeam) and a Sub Form (subfrmMember) and I wish to limit the number of records to four (4) for each Form Record. How do I get the Sub Form to count the number of Records? Thanking you in anticipation. Rayh |
#3
|
|||
|
|||
Record Count on Forms
Thanks Ed.
I have two tables (tblTeam to frmTeam) and (tblMember to subfrmMember) and each team consists of 4 members. Therefore, I need to move to the next team when I have entered 4 members. Hope this makes sense. Rayh "Ed Robichaud" wrote in message ... One suggestion would be to modify your subForm's record source query to select the last 4 records by date or some other field/value. Why the limit? Are you confusing display space with data structure issues? -Ed "Ray Hogan" wrote in message ... Hi, I have a Form (frmTeam) and a Sub Form (subfrmMember) and I wish to limit the number of records to four (4) for each Form Record. How do I get the Sub Form to count the number of Records? Thanking you in anticipation. Rayh |
#4
|
|||
|
|||
Record Count on Forms
My guess is that you can use the Form_AfterInsert Event of the Form
subfrmMember to count the number of Records in the Subform and take appropriate action, e.g. setting AllowAdditions to False. You will also need to consider the number of Members when the Main Form moves from one Record to another. You also need to consider the case where the Subform already has 4 Records and the user deletes one Member. In this case, the AllowAdditions should be change from False to True. It is actually fairly complex if you want to consider all user's actions. -- HTH Van T. Dinh MVP (Access) "Ray Hogan" wrote in message ... Thanks Ed. I have two tables (tblTeam to frmTeam) and (tblMember to subfrmMember) and each team consists of 4 members. Therefore, I need to move to the next team when I have entered 4 members. Hope this makes sense. Rayh "Ed Robichaud" wrote in message ... One suggestion would be to modify your subForm's record source query to select the last 4 records by date or some other field/value. Why the limit? Are you confusing display space with data structure issues? -Ed "Ray Hogan" wrote in message ... Hi, I have a Form (frmTeam) and a Sub Form (subfrmMember) and I wish to limit the number of records to four (4) for each Form Record. How do I get the Sub Form to count the number of Records? Thanking you in anticipation. Rayh |
Thread Tools | |
Display Modes | |
|
|