Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacement for USE/SELE table with IF...ELSE...ENDIF
Message
From
02/10/2007 11:02:12
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01257862
Message ID:
01257914
Views:
18
>>>>>>I know there is some way of putting this on one line using IIF (I think), but I just can't recall it right now. Thanks!
>>>>>>
>>>>>>
>>>>>>IF NOT USED('Schedule')
>>>>>>	USE Schedule IN 0
>>>>>>ENDIF
>>>>>SELECT Schedule
>>>>>>
>>>>
>>>>Ok, I thought there was a one-line way of doing it, but maybe not.
>>>
>>>Probably better than Torre's as it is not reopening a table when it is already opened:
>>>
>>>
USE (IIF(USED('Schedule'),"","Schedule")) IN 0
>>>
>>>
>>>Walter
>>
>>That's the one I was looking for. Thanks!
>
>But does that actually select SCHEDULE if it's already open?

Dammit Terry! Now I've got to change my code yet again and move the solution stars around. Again! <g>
Previous
Reply
Map
View

Click here to load this message in the networking platform