I have a feeling I am missing something obvious. Consider the code fragment:
Here is my question - the query outputs a single number, say 50, in a 'one-celled' query output. How do I assign this value to the variable intID_Count?
Thanks in advance
Code:
Dim db as DAO.Database,strSQL As String, strQryCount As String, intID_Count As Integer
strSQL = "Select Count(ID) AS ID_Count FROM qry_X;"
Set db = CurrentDb()
Set MyQueryDef = db.CreateQueryDef(strQryCount, strSQL)
DoCmd.OpenQuery strQryCount
intID_Count = ???????
code continues.....
Here is my question - the query outputs a single number, say 50, in a 'one-celled' query output. How do I assign this value to the variable intID_Count?
Thanks in advance