Re: running a make table query in an access database from VB
- From: "Val Mazur \(MVP\)" <group51a@xxxxxxxxxxx>
- Date: Sun, 14 Aug 2005 22:35:39 -0400
Hi Earl,
Here is an example how to call the query against Access database. There is
only one suggestion here: inside of the example, you will see that ADO
returns recordset, but if you need just to call an action query, then
replace next code
Set Rs1 = Cmd1.Execute()
with
Cmd1.Execute()
It will execute the query, but will not return the recordset. You could
actually delete the whole recordset declaration part, because you do not
need it
--
Val Mazur
Microsoft MVP
http://xport.mvps.org
"Earl Takasaki" <EarlTakasaki@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6FE56331-97DC-4BAE-B1C5-9A8D8EF0AB33@xxxxxxxxxxxxxxxx
> Hi:
>
> I am a newbie VB programmer. I have an access database (MyDatabase.mdb),
> but
> cannot assume that Access.exe is available. Within this database there is
> a
> "make-table" query called "MakeTable1." The SQL for this table is simply
> "SELECT * INTO Table1 FROM Query1" where Query1 is an existing query in
> the
> db.
>
> What I would like to do is simply "execute" the MakeTable1 query (or
> alternatively, execute the SQL statement "SELECT * INTO Table1 from
> Query1")
> from VB. I don't need to put recordsets or anything like that -- just need
> to
> automate the make-table query and Table1 created (or recreated) on
> command
> from VB code. I'm sure this is really simple, but I am a little lost. Can
> someone help me with a code sample?
>
> Best,
>
> --
> Earl Takasaki
> Master of Financial Engineering Candidate
> University of California at Berkeley
.
- References:
- running a make table query in an access database from VB
- From: Earl Takasaki
- running a make table query in an access database from VB
- Prev by Date: Re: Hiding DataGrid Rows
- Next by Date: Re: missing parameter but no parameters used ??
- Previous by thread: running a make table query in an access database from VB
- Next by thread: RollbackTrans methos still set Underlying Values
- Index(es):
Relevant Pages
|