If the SQL is not stored, there are limits to how long the string can be. However, if it doesn't overflow those limits, you can open the subform with that SQL as its recordsource. There is a {formname}.Recordsource property you load that to. However, it has been a while since I'e done this. I think you have only 255 characters in the string that results from just loading the SQL statement to the recordsource property. There is also the little matter that the query had better provide all the fields the form needs or you invite even more confusion.