By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

Psuedo Code

P: n/a
Hi,

I would be very grateful if somebody could point me in the right direction.
I need access to perform the following operations when I click a command
button...(I am using yes/no fields for TRUE and FALSE) If you could give me
the first 2 lines I could probobly work the rest out myself....Many Thanks!

All records that have the PROCESSED field as FALSE will be set to TRUE
All records that have the NEWORDER field as TRUE will have their OLD field
set to TRUE
All records that have the OLD field set to TRUE will have their NEWORDER
field set as FALSE
All records that have the OLD field set as FALSE will have their NEWORDER
field set as TRUE

--
Kind Regards,
Customer Services
Blue Bell Trading
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Blue Bell Trading - Customer Services" <bl*************@blueyonder.co.uk>
wrote in message news:4v********************@fe2.news.blueyonder.co .uk...
Hi,

I would be very grateful if somebody could point me in the right direction. I need access to perform the following operations when I click a command
button...(I am using yes/no fields for TRUE and FALSE) If you could give me the first 2 lines I could probobly work the rest out myself....Many Thanks!
All records that have the PROCESSED field as FALSE will be set to TRUE
All records that have the NEWORDER field as TRUE will have their OLD field
set to TRUE
All records that have the OLD field set to TRUE will have their NEWORDER
field set as FALSE
All records that have the OLD field set as FALSE will have their NEWORDER
field set as TRUE

--
Kind Regards,
Customer Services
Blue Bell Trading


If I'm interpreting the requirements correctly from your post, this update
query will do what you want.

UPDATE t SET t.Processed = True, t.NewOrder = Not [Old], t.Old =
IIf([neworder],True,[Old]);

HTH,
Randy

Nov 13 '05 #2

P: n/a
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:Bg*******************@newssvr19.news.prodigy. com...

"Blue Bell Trading - Customer Services" <bl*************@blueyonder.co.uk>
wrote in message news:4v********************@fe2.news.blueyonder.co .uk...
Hi,

I would be very grateful if somebody could point me in the right

direction.
I need access to perform the following operations when I click a command
button...(I am using yes/no fields for TRUE and FALSE) If you could give

me
the first 2 lines I could probobly work the rest out myself....Many

Thanks!

All records that have the PROCESSED field as FALSE will be set to TRUE
All records that have the NEWORDER field as TRUE will have their OLD
field
set to TRUE
All records that have the OLD field set to TRUE will have their NEWORDER
field set as FALSE
All records that have the OLD field set as FALSE will have their NEWORDER
field set as TRUE

--
Kind Regards,
Customer Services
Blue Bell Trading


If I'm interpreting the requirements correctly from your post, this update
query will do what you want.

UPDATE t SET t.Processed = True, t.NewOrder = Not [Old], t.Old =
IIf([neworder],True,[Old]);

HTH,
Randy

Hi Randy,

Thats worked great thanks.

--
Kind Regards,
Customer Services
Blue Bell Trading
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.