Barny,
1. The FCOUNT() function expects a charchter expression that evaluates to an alias.
? FCOUNT("daty")
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--