Hi everybody, i have the following problem ...
Code:
DoCmd.OpenForm "EDIT_BCs_SepSysIDs", acDesign
Set ctl = Forms!EDIT_BCs_SepSysIDs.Form!TabCtl14
For ind = 1 To num
str = Replace("SegID_[ind]", "[ind]", CStr(ind))
Set pa = ctl.Pages.Add
pa.Name = str
SQLstr = "SELECT dummystuff FROM dummytbl"
'
' add a subform to the page ...
'
Set page_sub = CreateControl("EDIT_BCs_SepSysIDs", acSubform, acDetail, str, "", 500, 1000, 6000, 4000)
page_sub.Name = "seg_sub_" & CStr(ind)
Set qry = CurrentDb.CreateQueryDef("", SQLstr)
Set tbl = qry.OpenRecordset
pa.Enabled = True
'Open page sub ? HOW ? -> ERROR
Set page_sub.Form.Recordset = tbl
Next ind
well, it works so far as intended, but i can't assign the Recordset.
It seems to be the same with the Recordsource, so, what can i do ? It seems i can't refer to the "page_sub.Form" because it does not exist.
It would be an option for me to assign a Form as "Content" of the "page_sub"-Control, and maybe that is what i have to do anyway, but i don't know how (?)
I appreciate the kindness of reading this post with interest and really would be very thankful for all sorts of suggestions.
Best regards,
...