I've got such a simple SQL query, but it won't output the friggin results of the query!
I put the query in a "Query" in access, run it... and it outputs me a integer value. I'm running the following VBA code in "Form Load"
What it does is on form load instead of popping up a msgbox saying 41 or whatever the integer value of that count query should be.... it outputs the query itself:
Any ideas on how I can get the SQL query to run as a query and output the value into the msgbox?
I put the query in a "Query" in access, run it... and it outputs me a integer value. I'm running the following VBA code in "Form Load"
Code:
Private Sub Form_Load()
Dim strSQL As String
strSQL = "SELECT Count(*) FROM ContactDetails;"
MsgBox strSQL
What it does is on form load instead of popping up a msgbox saying 41 or whatever the integer value of that count query should be.... it outputs the query itself:
Code:
SELECT Count(*) FROM ContactDetails
Any ideas on how I can get the SQL query to run as a query and output the value into the msgbox?