Select * From deposits; WHERE policy_no = thisform.lnPolicyNo AND BETWEEN (dep_date,ldbegindate,ldenddate); Into cursor depositdetailAfter the cursor is created and I try to view it in the data session menu option an error message comes up and says 'object is not contained in a form'. Instead of using a form property, I tried using a variable in the where clause and named it "lnPolicyNo" and I get an error message about can't find variable "lnPolicyNo".