Hello everyone,
I am trying to display the result of a SQL select query in a message box in access 2016. My initial thinking was that I need to use Openrecordset, but for some reason I can't manage to get it to work.
This is my code:
sqlstring = "Select [Current Period] from tblCHinfo"
Set Msgstring = CurrentDb.OpenRecordset(sqlstring)
MsgBox (Msgstring)
I also tried to search in the forum for an older topic on this, but couldn't fine one. Is anyone able to help out with this one ?
I am trying to display the result of a SQL select query in a message box in access 2016. My initial thinking was that I need to use Openrecordset, but for some reason I can't manage to get it to work.
This is my code:
sqlstring = "Select [Current Period] from tblCHinfo"
Set Msgstring = CurrentDb.OpenRecordset(sqlstring)
MsgBox (Msgstring)
I also tried to search in the forum for an older topic on this, but couldn't fine one. Is anyone able to help out with this one ?