Since setting the RecordSource of a form programmatically is a trivial task per se, I assumed the OP was trying to set it before it opened so that the user wouldn't see it before it changed.
Of course no well designed database should ever need to open any objects in design mode.