The form you want to change the Record Source on will need to be open. You
would then use a command such as:
Forms!FormName.RecordSource = "SELECT * FROM Table1 ORDER BY Field1;"
This won't still be there if you close and reopen the form. To make it
"stick", you'll have to do this with the form open in design view then close
the form, saving the changes.
Example:
DoCmd.OpenForm "Form1", acDesign,,,, acHidden
Forms!Form1.RecordSource = "SELECT * FROM Table1 ORDER BY Field1;"
DoCmd.Close acForm, "Form1", acSaveYes