how do i feed the result of a query into a msgbox in access?
You may wish to use a recordset.
Dim rs As DAO.Recordset
Set rs=CurrentDB.OpenRecordset("NameOfQuery_Table_Or_SQLString")
If Not rs.EOF Then
MsgBox "Hi, the first record, first field is " & rs.Fields(0)
End if
You could also use an ADO recordset if you wish to return all the records to a string.
It might be easier to use DLookUp, it all depends on what you want returned and from where.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With