请解释从我是 VB 新手的代码中获取的这些语句的含义,我们将不胜感激。谢谢。
'Statement
While Not MyRec.EOF ' Loop trough the table
MyList = MyList & ";" & MyRec![email]
MyRec.MoveNext
Wend
MyList = Mid(MyList, 2)
'Below CODE
function GetMailList()
Dim MyDB As DAO.Database, MyRec As DAO.Recordset, MyList As String
Set MyDB = CurrentDb
Set MyRec = MyDB.OpenRecordset("Select email From TableName")
While Not MyRec.EOF ' Loop trough the table
MyList = MyList & ";" & MyRec![email]
MyRec.MoveNext
Wend
MyList = Mid(MyList, 2)
' use you code here with the mail list ceated
MyRec.Close
MyDB.Close
End Function
谢谢