The sample VBA Code below reads and prints (in the Debug window) the contents of a Memo Field (Notes) from the Employees Table of MS-Access sample database - Northwind.mdb:
Code:
Public Function memotest()
Dim db As Database, rst As Recordset, xyz As Variant
Set db = CurrentDb
Set rst = db.OpenRecordset("Employees", dbOpenTable)
Do While Not rst.EOF
xyz = rst![Notes]
Debug.Print xyz
Debug.Print
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
Set db = Nothing
End Function
The memo field value is read into a Variant Type variable (xyz) before it is being printed on Debug Window.