and my Spanish isn't very good, but I will take a shot at it. What I am
assuming is:
1. you have items in a database with months attached to it.
2. you have a query with all available months in the items.
3. The first time around, you want to display the data of the last monts
in the table.
4. After that, you want to display the data for the month selected by
the user
<cfquery name="qOutrosMeses" datasource="#request.dsn#">
SELECT DISTINCT data1, meses
FROM ...
</cfquery>
<cfparam name="form.outrosmeses" default="#qOutrosMeses.data1#">
<cfquery name="qGetData" datasource="#request.dsn#">
SELECT *
FROM ...
WHERE data1 = <cfqueryparam cfsqltype="CF_SQL_DATE"
value="#form.outrosmeses#">
</cfquery>
...
<cfform action=""> <cfselect name="outrosmeses"
query="qOutrosMeses"
value="data1"
display="meses"
selected="#form.outrosmeses#">
</cfselect>
<input type="submit" name="submit" value=" Consultar ">
</cfform>
Pascal Peters
Certified ColdFusion MX Advanced Developer
Macromedia Certified Instructor
LR Technologies
Av. E. De Mot, 19
1000 BRUSSELS, BELGIUM
Tel: +32 2 639 68 70
Fax: +32 2 639 68 99
Email: [EMAIL PROTECTED]
Web: www.lrt.be
> -----Original Message-----
> From: Pedro Mendes [mailto:[EMAIL PROTECTED]
> Sent: vrijdag 16 april 2004 10:17
> To: CF-Talk
> Subject: Re: Passing a form value in its action attribute
>
> Hllo once more,
>
> I've taken care of this CFIF. It is gone now. I've added
> instead a cfparam, thanks to Michael Tangorre's suggestion.
> <cfparam name="form.outrosmeses" default="" />
>
> The problem is, now I don't get an error, but the variable
> assumes an inicial value of ' ' the first time around, and
> is ceched. So, if you try to see information fot a previous
> month, it assumes, not the date you selected, but the value
> before that.
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

