Display Query Results in a Message Box

mlr0911

Registered User.
Local time
Today, 10:45
Joined
Oct 27, 2006
Messages
155
Hello All,

Does anyone know how to display a queries result in a message box?
 
Queries usually return RecordSets and MsgBox's are not designed to display RecordSets. How about giving us a little more detail on what you are trying to achieve and maybe someone will have a different idea for you?
 
Thanks RuralGuy....

I can achieve a message by displaying the code below..................this is after I have imported my information into the database. The information that I am importing is numbers. I can count the records using the code below, but I really need the sum of the numbers that were imported. That is why I have a query summing the numbers, but I really need to be able to display that information in a message box, not a query opening and showing me the information.

MsgBox "Import Operation Compete." & Chr(13) & Chr(13) & _
Trim(Format(lngreccount, "#,##0")) & " Records Read" & Chr(13) & _
Trim(Format(lngrecwritten, "#,##0")) & " Records Written that met criteria.", vbInformation + vbOKOnly, "Import Complete"
 
Have you looked into using DSum() to gather the data for your MsgBox?
 
RuralGuy.......didn't think of that. Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom