Re: Automating a query
- From: alex <alex@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 13 Mar 2006 06:08:27 -0800
Hey Gary
Beswering you I decided to revert the EV tabe to "auto Numer" and tried the
script in VB. Guess what it worked fine. So it must be something to do with
how VB reads the SQL command.
If you're up to it, my criteria is not working. This is the line I'm using:
& "WHERE (((EV.EmployeeID)=[T].[EmployeeID]) AND
((EV.From)<=([E].[ArchiveCalcDate])));"
If you're too busy I'll keep trying for a few months.:)
Thanks
"Gary Walter" wrote:
Hi Alex,.
Best guess is that your original "appendto"
table (ArchiveEmployeeVacations) had an
*autonumber* primary key which I tried to
explain earlier.
Was that the case?
Do I need to explain that better?
good luck,
gary
"alex" wrote:
What a pain!! Your idea worked like a charm and I am receiving the results
I
need. I guess I did not have the right code in for the SQL statement? All
I
have to do now is set the proper criteria and repeat the process for 5
more
queries.
Tell me something though why would the query work in Access and not in a
VB
statement?
If you don't have time I understand. But all he same thanks a bunch.
"Gary Walter" wrote:
I forgot to ask you to set
the Criteria....
plus... you should be able
to just keep running code
and *more records* will be
appended.
If you delete all the records in "test,"
then set index of the field(s) in "test"
that were your primary key
in the original table to
"No Duplicates"
then the code should stop
adding duplicates (silently).
good luck,
gary
- Follow-Ups:
- Re: Automating a query
- From: Gary Walter
- Re: Automating a query
- From: Gary Walter
- Re: Automating a query
- References:
- Re: Automating a query
- From: Gary Walter
- Re: Automating a query
- From: Alex
- Re: Automating a query
- From: Gary Walter
- Re: Automating a query
- From: Alex
- Re: Automating a query
- From: Gary Walter
- Re: Automating a query
- From: alex
- Re: Automating a query
- From: Gary Walter
- Re: Automating a query
- From: Gary Walter
- Re: Automating a query
- From: Gary Walter
- Re: Automating a query
- Prev by Date: Re: Query a Column of Data to a Field NAME
- Next by Date: Query by dates
- Previous by thread: Re: Automating a query
- Next by thread: Re: Automating a query
- Index(es):
Relevant Pages
|