Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Aliases with VFP7 Functions
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00947729
Message ID:
00947743
Views:
11
Barny,

1. The FCOUNT() function expects a charchter expression that evaluates to an alias.
* Refrence alias directly
? FCOUNT("daty")
* Use alias stored in a variable
lcAlias = "daty"
? FCOUNT(lcAlias)
2. The FIELD() is a function, not a method of a table/cursor.
thisform.bwtxt2.Value = FIELD(m.lifldcnt, "daty")
>I have stripped out the below code in a method I am writing, so it is not in context…But
>
>Can someone explain why the following error messages occur in the code I have highlighted with brackets [] below:
>
>The 1st bold generates “Variable daty is not found” unless I write FCOUNT(‘DATY’)
>The 2nd bold generates “Object daty is not fount”
>
>m.lcyfil = "y0”
> USE (m.lcyfil) ALIAS daty IN 0 && y_ dat file to collect fields
> FOR m.lifldcnt = 2 TO [FCOUNT(daty)]
>
> thisform.bwtxt2.Value = [daty.field(m.lifldcnt)]
> messagebox(“error check”,1,0)
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform