I didn't know it would error with 'can't find Form" because the recordsource didn't exist. To me, that did not seem a correct error as the Form did exist. I was wanting to establish a new Record source so the current one wasn't relevant.
But this is interesting, your question Why do you use QueryDefs to make a query puzzles me and I wonder why would not ? So here's my code and perhaps you can show how you would do it ?
frmDisco's recordsource is qryDisco. This is built at runtime, from the data active at the time. The sql will appear gibberish but that shouldn't matter
Code:
Dim myquery As QueryDef
qryName = "qryDisco"
sql = "Select A, B, HandleThis(C) as iC, D from " & MyCompany & " Where " & ActiveBtn & " Like " & Chr$(34) & Dat & Chr$(34) & ";"
Set myquery = db.QueryDefs(qryName)
myquery.sql = sql$
DoCmd.OpenForm "frmDisco", acFormDS