>I meant aUsed. How many aliases open do you have in your form? I'm with Borislav here, you may accidentally switch to the wrong alias and don't even know.
>
>Just put in debugger:
>
>fcount()
>fcount('MyCAAlias') and see if the numbers differ.
>
OKay, did it in the debugger and got:
AUsed() - 1
fcount() - 2
fcount('sftable') - 2
afields() - 1
not liking this at all. :-(
Thanks for all the advise anyway, Naomi and Borislav.
>>>>>>yes, it is the only cursor open at the time. It is a CursorAdapter thru ADO, if that makes a difference.
>>>>>
>>>>>Hard to say, then. Can you post some code?
>>>>
>>>>sure. This is the lines of code, but I can see the problem from the debugger as soon as I get the form up:
>>>>
>>>>
>>>> FOR m.nFld = 1 TO FCOUNT()
>>>> IF TYPE(FIELD(m.nFld)) = "G"
>>>> LOOP
>>>> ENDIF
>>>> IF OLDVAL(FIELD(m.nFld)) # CURVAL(FIELD(m.nFld))
>>>> m.lHadMessage = .T.
>>>> IF MESSAGEBOX(E_DIRTYREC_LOC,4+48) = MSGBOX_YES
>>>>
>>>>
>>>
>>>Can you put select your alias right before this code or add fcount('MyAlias') here? What does aused return?
>>
>>there is a select correct alias a head of this code, just not right before it. and Used() returns my correct alias, while fcount() returns 2 and afields() returns 1 in the debug window, when stopped at the for line.