Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange function behavior
Message
From
23/06/1999 15:38:25
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
23/06/1999 11:13:27
Jolene Dicks
Human Resources Development Canada
St. John's, Newfoundland, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00233004
Message ID:
00233150
Views:
25
>If CharVar=.F.
> Return Val(CCATSVal)
>Endif
>If CharVar=.T.
> Return CCATSVal
>Endif
>
>If it finds the field and value in that table it returns the predefined CATS value from the table. But if it doesn't find it in the convert table, I used the DBGETPROP() to pick up the default value for that field. This seems to work. However, once the replace statement is executed in the main program, the replace doesn't seem to excecute. Anyone have any suggestions on what to try.

You may try putting

lnSelect=select()

right after the Lparameter line, and

select (lnSelect)

before the block I quoted. You do a replace with a function which actually selects another table, and I'm not sure where you are when you return. It's just safer to save and restore some environment in routines like this. You may also be at Eof after this Locate (btw, you don't need the GO TOP in the function - Locate will work the same without it and you'll get some speed), so Les Pinter's answer may apply to that case.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform