var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Change recordsource in the specific form
I want to write Visual Basic language in the form with one button:
I have one form named "setForm" with one button and one text box:
Let's set the new table "frm2", the new form "frm2"
Dim sql As String
sql = "SELECT [model].* INTO frm2 FROM [model]"
DoCmd.CopyObject CurrentDb.Name, "frm2", acForm, "frm1"
Forms!frm2.RecordSource = "frm2"
The last statement code doesn't work: It is said that Microsoft Access cannot find the form "frm2" referred to in a macro expression or visual basic code.
How can I change the recordsource? Thanks.