ShaneBrennan
Programmer
I have this little problem.<br><br>I'm trying to limit the number of records that can be entered into a sub-form.<br><br>I have two variables:<br><br>MaxAllowed: The maximum number of boxed allowed to be placed in a filing cabinet.<br>NoOfBoxes: Who's control source counts up the number of records in the sub-form.<br><br>Both these variables work beautifully - not bad for access. <br><br>I also have a piece of code in the ON TIMER of the sub-form which checks these variables, compares them - then sets the ALLOW ADDITIONS event accordingly - this is run every 1/10th of a second.<br><br>This all works absoultely wonderfully however there is a small problem. Before the timer has chance to execute, speed typest can sneek in an extra record into the sub-form before the ALLOW ADDITIONS is set to false.<br><br>I've tried placing the code into a field on the sub-forms in the following events and they don;t seem to be able to solve the problem:<br><br>ON GET FOCUS<br>ON LOST FOCUS<br>ON CLICK<br>etc.<br><br>I know the code in the timer works - extensive testing has shown this. It's just the delay between entering the last record in the sub-form and ALLOW ADDITIONS being set to false.<br><br>Any sugestions?<br><br>I would be grateful for any help on this.<br><br> <p> Shane Brennan<br><a href=mailto:brennans@tcat.ac.uk>brennans@tcat.ac.uk</a><br><a href= > </a><br>