Removing the quotes from #form.id# and the 1 to be inputted did the
trick!

Many thanks to Avi and Chris for the jump-start! Now I can stop obsessing
over this page and move on... =P

Cheers,
James

-----Original Message-----
From: Chris Meier [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 04, 2000 4:25 PM
To: [EMAIL PROTECTED]
Subject: RE: Updatign a YES/NO record


If the ID field is an auto-number field, remove the quotes around
#form.id#.
Also, if this is an Access2000 db, you might try using YES and NO instead
of
0 and 1...a lot changed in Access2k from 97, this might be one of those
changes.

-----Original Message-----
From: James Mathieson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 04, 2000 4:13 PM
To: Cf-Talk Mailing List (E-mail)
Subject: Updatign a YES/NO record


Heya all,

I'm fairly new to all of this (though loving every minute!) and am stuck
with an SQL problem. What I want to have happen is this:

1. When the given entry is approved, the approved entry is written to a
table (seperate from the source table)
2. The entry in the original table is marked as approved.

The database in an Access2000 db, and the field "checked" is a YES/NO
type.

My problem is, when I process the form, the new record is written to the
second table just fine, but the original record is not marked as checked
off, and the test of the page chokes with an error. I know my problem is
in the SQL for the update, but I can't seem to get the expression right!
Here's what I have:

<cfquery name="checkedrecord" datasource="timesheets">
update timesheets
set checked='1'
where ID='#form.ID#'
</cfquery>

I've tried =1, ="1", ='1', since the "Mastering ColdFusion 4" book states
"When manipulating a Microsoft Access logical (YES/NO) field, use 1 for
YES and 0 for NO." So I *should* be setting it to 1...right?...

Is my problem my update query, or do I need to set a variable to use for
the set command, or what? I'm sure there's an obvious answer right in
front of me, but I'm stumped...

Thanks in advance!
James

=======================
James Mathieson
[EMAIL PROTECTED]

Kurtis & Associates, P.C.
2000 M Street, N.W., Suite 600
Washington, D.C. 20036
(202) 328-4500 (voice)
(202) 328-1231 (fax)
--

-------------------------------------------------------------------------
---
--
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.

------------------------------------------------------------------------------
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.

Reply via email to