Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-04-01 : 08:06:49
|
| Miguel writes "We use front page in conjunction with access in order to create forms for workshop registrations and what not. I have it set up where students can select a date from a drop down menu that I created in front page the entries go into an access database created from the from in front page. We have a limit of 30 students per workshop but right now it's operating with no limits, is there a way I can type in a code to limit the capacity of each workshop. Any info will be greatly appreciated thanks. Here's the link to the site. http://studentaffairs.csufresno.edu/lrc/map_application_survey_Form_probation_2005.asp" |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2005-04-01 : 11:40:06
|
| I don't recall if Access (and this is a SQL Server site, BTW) supports triggers but the basic logic could be implemented either in a trigger or in code. Use the COUNT function to determine the number of entries in the particular WorkGroup. If it exceeds your allowed limit, fail the insert of any new student.e.g.declare @CurrentStudentCount intselect @CurrentStudentCount = COUNT(*)from Enrollmentwhere WorkshopID = <Your Workshop Number>if @CurrentStudentCount < 30 begin insert into Enrollment (... values (... endHTH=================================================================In order to improve the mind, we ought less to learn than to contemplate.-Rene Descartes, philosopher and mathematician (1596-1650) |
 |
|
|
|
|
|