If nothing is select on the select list it doesnt exist on the next page. You could
fix this several ways.
1. In the select list assign the first value to 0 and give ti text of Please select.
<option value="0" selected>Please Select ... </option><cfquery = "qryName"><option
value="qryID">qryDesc</option>
This was it assigned 0. Problem with this is, if someone deselects your default one
you will get the error.
2. You should use <cfparam name="form.sl1" default ="">
(the default can be anything)
This way the parameter does exist. Cfparam says if something doesnt exist give it a
default value, if it does exist do nothing.
Then in your query you would do:
Select * from table
where something = something
<cfif len(form.sl1) NEQ 0>and columnname IN ('#form.sl1#') </cfif>
<cfif len(form.sl2) NEQ 0>and columnname IN ('#form.s21#') </cfif>
etc...
---------- Original Message ----------------------------------
From: R Navaneethan <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Sat, 15 Apr 2000 05:27:12 -0700 (PDT)
>Hi,
I have a form with five Select Lists (say
SL1,SL2,SL3,SL4,SL5) that I use to build query. All of
them are populated from a database table. I want the
user to select one or more items from these Select
lists based on their requirements.
When I build query on these user selection, I get the
following error:
"Error resolving parameter Form.SL1" ...SL5
If I select an item from all 5 lists, my query works
fine. If I leave any list without selection then I get
the above error. Please let me know the correct SQL to
handle this situation.
Thanks,
Navaneethan
__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.