Limit the qty of entries on a subform

CTQE

Registered User.
Local time
Today, 01:37
Joined
Feb 27, 2008
Messages
48
Hello All,

May someone explain to me how to limit the number of entries in a subform.

Thanks in advance!
 
Are you talking about limiting the number or actual records in a sub? How about a few lines of Basic for that...
Code:
if me.newrecord then
  if me.recordsetclone.recordcount = (your maximum limit here) then
    msgbox "Limit has been reached"
  end if
end if
 
Perfect!!!!!
You're the best!
 
Thanks again for that helpful insight.
Is there a way to prevent a new line from generating after the limit?
 
you might want to test it in the current event, so that you can stop your user starting a new record

maybe change allowadditions to false, and make a warning textbox visible

it would be really irritiating to create a new record, and only at the end be told "the table is full"
 

Users who are viewing this thread

Back
Top Bottom