HI,
I am trying to use openrecordset to access query fields but nothing happens. What am I doing wrong?
Thank you for any help.
I am trying to use openrecordset to access query fields but nothing happens. What am I doing wrong?
Code:
Public Function test() As String
Dim db As DAO.Database
Dim rst As Recordset
'Dim qryfld As DAO.QueryDef
'Dim fld As Field
Set db = CurrentDb()
Set rst = db.OpenRecordset("Copy Of Mail Merge", dbOpenDynaset)
Dim addresses As String
addresses = rst.Fields(0).Value
addresses = rst!address
test = addresses
End Function
Thank you for any help.