Forums
 This topic is locked 
             Limit Inserting Records
 28 Nov 2001  05:38:59 Alain Uy posted: 
 Hi! is it possible to limit the inserted record? for ex. for a certain date it must only have 4 record for that date if it exceeds then it must prompt for an error that the maximum record for the day is only 4 records.. any idea? Thanks in advance
Replies
 Replied 28 Nov 2001  14:54:30 
   28 Nov 2001  14:54:30 Andrew Watson replied: 
  If you use another recordset on the same page which counts the records in the db for that date. Then just have a conditional region to show or not show the insert form.
There is most probably a better way but its just an idea...<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Leed
  
  There is most probably a better way but its just an idea...<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Leed
 Replied 30 Nov 2001  06:44:34 
   30 Nov 2001  06:44:34 Alain Uy replied: 
  seems hard for me to analyze what ur saying anyways thanks for the idea... can u explain it more?? <img src=../images/dmxzone/forum/icon_smile_approve.gif border=0 align=middle>
  
   Replied 30 Nov 2001  16:39:41 
   30 Nov 2001  16:39:41 Andrew Watson replied: 
  OK,
At present you have a page which has a RECORD INSERT behaviour which inserts to this table.
You want to limit how many records are in the table.
On the same page as your insert create a recordset called rsRecordCount (or whatever you like). This recordset should return the count of records in the table (this is done in the SQL in the recordset dialouge box)
Use this value in the conditional region...
ie if this count is less than my maximum allowed records then show the insert form if not then show a message (or whatever) saying no more inserts allowed.
Hope this is more help..
Leed
Edited by - leed on 30 Nov 2001 16:41:14
  At present you have a page which has a RECORD INSERT behaviour which inserts to this table.
You want to limit how many records are in the table.
On the same page as your insert create a recordset called rsRecordCount (or whatever you like). This recordset should return the count of records in the table (this is done in the SQL in the recordset dialouge box)
Use this value in the conditional region...
ie if this count is less than my maximum allowed records then show the insert form if not then show a message (or whatever) saying no more inserts allowed.
Hope this is more help..
Leed
Edited by - leed on 30 Nov 2001 16:41:14
