>Well, the code is in a form which has data environment setup. And one of the field on the form is bound to a table field. Even after that, do I have to add the "set database to..." statement?
>
>Thanks
Puri,
Yes, having the databaser open does not insure that it is the currently selected database. You need to set database to make sure it is selected. The safe way is to;
LOCAL lcOldDBC
lcOldDBC = DBC() & save the current dbc
SET DATABASE TO TheOneYouWant
IF NOT EMPTY(lcOldDBc)
SET DATABASE TO (lcOldDbc)
ELSE
SET DATABASE TO
ENDIF