Connecting Tech Pros Worldwide Forums | Help | Site Map

Psuedo Code

Blue Bell Trading - Customer Services
Guest
 
Posts: n/a
#1: Nov 13 '05
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



Randy Harris
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Psuedo Code



"Blue Bell Trading - Customer Services" <bluebelltrading@blueyonder.co.uk>
wrote in message news:4vtoe.223094$Cq2.35958@fe2.news.blueyonder.co .uk...[color=blue]
> Hi,
>
> I would be very grateful if somebody could point me in the right[/color]
direction.[color=blue]
> 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[/color]
me[color=blue]
> the first 2 lines I could probobly work the rest out myself....Many[/color]
Thanks![color=blue]
>
> 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
>
>[/color]

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

Blue Bell Trading - Customer Services
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Psuedo Code


"Randy Harris" <randy@SpamFree.com> wrote in message
news:Bguoe.16470$iA6.15191@newssvr19.news.prodigy. com...[color=blue]
>
> "Blue Bell Trading - Customer Services" <bluebelltrading@blueyonder.co.uk>
> wrote in message news:4vtoe.223094$Cq2.35958@fe2.news.blueyonder.co .uk...[color=green]
>> Hi,
>>
>> I would be very grateful if somebody could point me in the right[/color]
> direction.[color=green]
>> 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[/color]
> me[color=green]
>> the first 2 lines I could probobly work the rest out myself....Many[/color]
> Thanks![color=green]
>>
>> 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
>>
>>[/color]
>
> 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
>[/color]
Hi Randy,

Thats worked great thanks.

--
Kind Regards,
Customer Services
Blue Bell Trading


Closed Thread


Similar Microsoft Access / VBA bytes