How can I change SQL table for form during the app?

Hi! I have another(and maybe the last) problem. I created a form and a control. In control I can call my form, I created button for that. In code(for button) I wrote(for example) : sc_redir(form,var={field}); In form I defined a variable [var](for example) (in SETTINGS or SQL, I do not remember) which helps me change data in form(change table). When I run form everything is ok. I type value of a variable and data changes. But if I run control and click the button, nothing changes. And form shows me wrong data(from wrong table. And name of this table I used earlier, when I ran only form).

How can I change SQL table for my form during the app?

P.S. Excuse me for my English. I hope I wrote all clear.