Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP says variable does not exist, when if does exist
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
VFP says variable does not exist, when if does exist
Miscellaneous
Thread ID:
00922789
Message ID:
00922789
Views:
129
I always get the strange ones, believe me!!

I was doing some maintenance for a client whose app has not needed much in awhile. I was thinking that I had moved them up to VFP 8 a few months back, so I made the changes in VFP 8 and got them working and sent them the new EXE. Well, it wouldn't run because they hadn't been moved up to VFP 8 and so I had to send them a new EXE compiled in 7. I'm going to get them upgraded to 8, but this was the quick fix. So they got the new version installed and started it up and ran the new feature and got an error.

Well, there are no errors in this new code and so I was at a loss to explain this. I ran it on my machine under VFP 7 and it errored out there, too. However, there are no errors in this code. I say that because it was telling me that a form property didn't exist that does exist. Here's the code:

locate for code = .NewCode and code_type = CodeType

VFP 7 claimed that "Variable 'NEWCODE' is not found." Funny, but when I put the cursor on it in the Trace window, VFP kindly displays the value of the property. And, of course, this code is within a WITH THISFORM ENDWITH block. Plus, the same property is referenced in a line before this line and that line does not fail. Adding weirdness to strangeness, this very same code compiled and run under VFP 8 works like a champ!!

So I'm left wondering why VFP 7 wigs out on this code. Anybody seen anything like this before? Could be some kind of false error message, but again, why would it work in VFP 8 and not VFP 7.

It's always something!

Thanks,

Russell Campbell
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Next
Reply
Map
View

Click here to load this message in the networking platform