If it's just the form name you want to get from a variable, you're in
luck. This works:
Dim strFormName As String
strFormName = "frmFoo"
Forms(strFormName)!YourSubformName.Form.RecordSource = _
"SELECT X FROM TableX"
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)