Doing queries in VBA
- From: ispy99 <ispy99@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 21 Jun 2005 13:45:02 -0700
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.
.
- Follow-Ups:
- Re: Doing queries in VBA
- From: Douglas J. Steele
- Re: Doing queries in VBA
- Prev by Date: Re: Startup/autoexec
- Next by Date: Re: Doing queries in VBA
- Previous by thread: Startup/autoexec
- Next by thread: Re: Doing queries in VBA
- Index(es):
Relevant Pages
|