Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Big Problem with simple code
Message
From
07/09/2005 03:45:45
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01047265
Message ID:
01047266
Views:
12
Use == like this...

> case mreclights == 'Domestic Chassis'


>Out of no where my projects are screwed up.
>
>below m_recess_lights.value = selected for a drop-down by user
>
>CODE Example:
>
>mreclights = alltrim(m_recess_lights.value)
>do case
> case mreclights = 'Domestic Chassis'
> m_featureno = '3N0105'
> case mreclights = 'Import Chassis'
> m_featureno = '3N0106'
> case mreclights = 'Domestic Chassis LED'
> m_featureno = '3N0107'
> case mreclights = 'Import Chassis LED'
> m_featureno = '3N0108'
> otherwise
> m_featureno = ''
>endcase
>
>
>If I step through this and mreclights = 'Domestic Chassis LED' it will always process the 1st case statement, making m_featureno = '3N0105' and not the 3rd case statement as it should.
>
>If I step through this and mreclights = 'Import Chassis LED' it will always process the 2nd case statement, making m_featureno = '3N0106' and not the 4th case statment as it should.
>
>I don't know what happened or why it's doing this. The only way to fix this is to move the 3rd and 4th case statments above the 1st and 2nd case statments but I cannot because I'd have to do this in to many places.
>
>Thanks in advance for any help provided.
>
>Regards,
>Torrey
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform