When you say you can't get the form to work, do you mean you are getting
error messages or it's just not behaving as expected? If you paste any
error messages you get into your posting, it helps people help you.
One issue may be that an unchecked checkbox will result in NO form element
being recognized on the processing page. If this is your problem, you can
either:
1) User cfparam tags to handle missing form elements (e.g., <cfparam
name="form.january" default="no">
2) Use a radio button instead of a checkbox to force users to select one or
the other
-----Original Message-----
From: Tammy Schilling [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 2:55 PM
To: CF-Talk
Subject: newbie question
--------------704CA9BF13C96FBC1A24AFE5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi all,
I'm relatively new to CF. I'm trying to design an interface for a local
non-profit that holds monthly meetings to track attendance at those
meetings. I have an Access db with a table called Attendance. This
tables columns are the ID for each member and one for each month,
Jan-Dec. They keep a "rolling calendar", so year is not a factor in the
attendance tracking. They just want each month's attendance to write
over the attendance in that month from the year before.
The ID column is a number column and each of the month columns are
yes/no. I have an interface which pulls the names of members who've
attended in the last 12 months (in order to minimize the number
displayed and make it more useable) along with a check box to be checked
if the person was at that month's meeting, but I can't seem to get the
form to work. I know it's probably something simple, but I've been
banging my head against it for too many hours now and can't think
anymore. Some help would be appreciated, please.
Here is the code:
This is the query that gets the existing data
<CFQUERY DATASOURCE="LLL" NAME="Active_Moms">
SELECT Attendance.July, Attendance.ID, MailingList.FirstName,
MailingList.LastName, Attendance.January, Attendance.February,
Attendance.March, Attendance.April, Attendance.May, Attendance.June,
Attendance.August, Attendance.September, Attendance.October,
Attendance.November, Attendance.December
FROM Attendance INNER JOIN MailingList ON Attendance.ID = MailingList.ID
WHERE (((Attendance.July)=Yes) OR ((Attendance.January)=Yes)
OR ((Attendance.February)=Yes) OR ((Attendance.March)=Yes) OR
((Attendance.April)=Yes) OR ((Attendance.May)=Yes) OR
((Attendance.June)=Yes) OR ((Attendance.August)=Yes) OR
((Attendance.September)=Yes) OR ((Attendance.October)=Yes) OR
((Attendance.November)=Yes) OR ((Attendance.December)=Yes))
ORDER BY LastName, FirstName
</cfquery>
This is the form
<FORM ACTION="process_janatten.cfm" METHOD="POST">
<INPUT TYPE="checkbox" NAME="January" VALUE="#January#">
<INPUT TYPE="text" NAME="FirstName" SIZE="30" MAXLENGTH="30"
VALUE="#LastName#, #FirstName#">
This is the form action query
<CFQUERY DATASOURCE="LLL">
UPDATE Attendance
SET January = '#January#'
WHERE ID = #ID#
</cfquery>
Thanks in advance!
Tammy
--
personal copy designs
better living through computer graphics
http://www.personal-copy.com
410 219 5300
--------------704CA9BF13C96FBC1A24AFE5
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi all,
<p>I'm relatively new to CF. I'm trying to design an interface for
a local non-profit that holds monthly meetings to track attendance at those
meetings. I have an Access db with a table called Attendance.
This tables columns are the ID for each member and one for each month,
Jan-Dec. They keep a "rolling calendar", so year is not a factor
in the attendance tracking. They just want each month's attendance
to write over the attendance in that month from the year before.
<p>The ID column is a number column and each of the month columns are
yes/no.
I have an interface which pulls the names of members who've attended in
the last 12 months (in order to minimize the number displayed and make
it more useable) along with a check box to be checked if the person was
at that month's meeting, but I can't seem to get the form to work.
I know it's probably something simple, but I've been banging my head against
it for too many hours now and can't think anymore. Some help would
be appreciated, please.
<p>Here is the code:
<p><u>This is the query that gets the existing data</u>
<p><CFQUERY DATASOURCE="LLL" NAME="Active_Moms">
<br>SELECT Attendance.July, Attendance.ID, MailingList.FirstName,
<br>MailingList.LastName, Attendance.January, Attendance.February,
<br>Attendance.March, Attendance.April, Attendance.May, Attendance.June,
<br>Attendance.August, Attendance.September, Attendance.October,
<br>Attendance.November, Attendance.December
<br>FROM Attendance INNER JOIN MailingList ON Attendance.ID = MailingList.ID
<br>WHERE (((Attendance.July)=Yes) OR ((Attendance.January)=Yes)
<br>OR ((Attendance.February)=Yes) OR ((Attendance.March)=Yes)
OR
<br>((Attendance.April)=Yes) OR ((Attendance.May)=Yes) OR
<br>((Attendance.June)=Yes) OR ((Attendance.August)=Yes) OR
<br>((Attendance.September)=Yes) OR ((Attendance.October)=Yes) OR
<br>((Attendance.November)=Yes) OR ((Attendance.December)=Yes))
<br>ORDER BY LastName, FirstName
<br></cfquery>
<p><u>This is the form</u>
<br><FORM ACTION="process_janatten.cfm" METHOD="POST">
<br><INPUT TYPE="checkbox" NAME="January" VALUE="#January#">
<br><INPUT TYPE="text" NAME="FirstName" SIZE="30" MAXLENGTH="30"
VALUE="#LastName#,
#FirstName#">
<p><u>This is the form action query</u>
<br><CFQUERY DATASOURCE="LLL">
<br>UPDATE Attendance
<br>SET January = '#January#'
<br>WHERE ID = #ID#
<br></cfquery>
<br>
<p>Thanks in advance!
<p>Tammy
<br>--
<br>personal copy designs
<br>better living through computer graphics
<br><A HREF="http://www.personal-copy.com">http://www.personal-copy.com</A>
<br>410 219 5300
<br> </html>
--------------704CA9BF13C96FBC1A24AFE5--
----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]