Function reclist(subfrm as form,fldname as string) as string
'功能:读取子窗体指定字段所有记录的值,并返回一个字符串。可用于列表框或组合框数据源。
'参数:subfrm--子窗体;fldname--读取的字段名称
'示例:me.学生姓名..RowSource=reclist(me.学生表子窗体.form,"姓名")
For i = 1 To frm.RecordsetClone.RecordCount
frm.Form.SelTop = i
reclist=reclist & frm.Form.controls(fldname) & ";"
Next
end function