Ok,
This is the code,
<cfquery name="number_entries" datasource="Your DNS">
SELECT “Primary Key Column�
FROM “Your table name�
WHERE “Primary Key Column� = 20
</cfquery>
<cfif number_entries.RecordCount NEQ 0>
<! ---this is the url the user will be sent to if you record count = 20--->
<! ---you have to create the “sorry.cfm� to tell the user that no more recorders can be added--->
<cflocation url="sorry.cfm" />
<cfelse>
<!--- if the count is < 20 than you INSERT the VALUES-->
<cfquery datasource="Your DNS">
INSERT INTO ( )
VALUES ( )
</cfquery>
</cfif>
It worked for me so it should work for you.
Take care,
Walyer
Walyer's Playpen