G
Guest
Pretty simple question. Does anyone have a simple example for retrieving
data from a table in Access using VBA? I realize there are functions which
let you do different things with table data, metadata, etc. What I am
looking for is a simple example for how you would execute a SQL statement in
a VBA module. I'll give an example:
select count(*) from table1 where buyDate > '06/01/2005'
So, how would I execute the above statement so that I could set a variable
in my module equal to the result? I have read about DAO and ADO, but they
both seem like overkill for a query in the Access project containing the
table I am interested in. Thanks in advance.
data from a table in Access using VBA? I realize there are functions which
let you do different things with table data, metadata, etc. What I am
looking for is a simple example for how you would execute a SQL statement in
a VBA module. I'll give an example:
select count(*) from table1 where buyDate > '06/01/2005'
So, how would I execute the above statement so that I could set a variable
in my module equal to the result? I have read about DAO and ADO, but they
both seem like overkill for a query in the Access project containing the
table I am interested in. Thanks in advance.