Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update option group field

Status
Not open for further replies.

mraetrudeaujr

Technical User
Dec 20, 2004
137
US
I'm trying to update a new field (option group generated) from a "check box" field. I thought that an SQL statement would work best, but I'm not that good at building one from scratch. The following is my attempt at it:
Table name = 2005 LOG
New field name (option group) = TempFileUsed
Old field name (check box) = TempFileUsed1

Code:
UPDATE [2005 LOG].[TempFileUsed]
SET TempFileUsed = 1,
WHERE TempFileUsed1 = 'TRUE';
FROM [2005 LOG]

I'm sure that something is missing, but at least I'm taking a stab at it, right? Thanks for the help everybody.
 

I went back and searched the Forum archives and found something that I could modify:

Code:
UPDATE [2005 LOG] SET TempFileUsed = IIf([TempFileUsed1],TRUE, Null)
WHERE TempFileUsed Is Null;

This looks like it worked (over 7300 records!) but it put minus signs in front of the numbers? How do I get rid of those?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top