A form has a RecordSource property, not a RecordSet
property. The RecordSource property is a string, so you
just use your SQL statement directly, rather than creating
a record set and trying to use that, which would result
in a Type Mismatch error.
Dim SQLstmt As String
SQLstmt = "Select * From TableA"
Me.RecordSource =...



