Subform help

oihjk

Registered User.
Local time
Today, 18:33
Joined
Feb 13, 2003
Messages
51
Is there a way to limit the amount of entries in a subform to a certain number?

I currently am trying to do it using the allowadditions property combined with onCurrent, but I need something to fire when I leave a record so that it sets allowadditions back to true. Is there an event that is the opposite of the onCurrent event? The onCurrent is fired when you move to a record. Is there an event that is fired when you leave a record?

Any other suggestions?

Thanks,
Eric
 
Figured it out...

This is what I did for those interested.

if Me.NewRecord then
if Me.RecordsetClone.RecordCount > 2 then
MsgBox "Only three entries allowed."
Me.Recordset.MoveFirst
endif
endif

I someone has a better option, please suggest it. Thanks, Eric
 

Users who are viewing this thread

Back
Top Bottom