Help!!!! Limitating the no. of records in a table

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I need to limitate the number or the records introduced by a certain user
in
a table at a time ( let's say to 7) . Can it be done? How?

Thank you!

P.S. This is a temporary table, from which I am moving the records in
another one, and I need to print a report before moving them, containing
at
most 7 records (a standardized one). The record are introduced using a
form and saved with a cmd. button
 
You could do this with some minor coding. Test how many records are entered
using a query like

myQry = "Select id, numentries as count(id) from myTable group by Id"
and check the value of numentries using DAO/ADO code before you allow the
insertion of a new record.
 
Every time the user tries to add a record, count the
number of records in the temp table. If 7 then...

Form_OnCurrent
If Me.NewRecord then ...

I don't know if you wanted to have them automatically
moved or to not allow them to add the eighth.?
 
I want not to alloud them to add the eighth record.
Can you write me the entire code you are thinkng at?
Thank you!
 
I need to limitate the number or the records introduced by a certain user
in
a table at a time ( let's say to 7) . Can it be done? How?

P.S. This is a temporary table, from which I am moving the records in
another one, and I need to print a report before moving them, containing
at most 7 records (a standardized one). The record are introduced using
a
form and saved with a cmd. button. I want not to alloud them to add the
eighth record.

Thank you!
 
Back
Top