DoCmd.RunSQL "HELP What to syntax to delete 1st three records of text file import"???

  • Thread starter Thread starter EagleOne
  • Start date Start date
E

EagleOne

2003

Just imported 1MM records from text file.

The first three records are a Mainframe header using three records.

Need the VBA code to delete those three records.

DoCmd.RunSQL "DELETE ???????

(or someother Code)

TIA EagleOne
 
How do you identify those three records as being different from the other
records? After the data are imported into the table, there is no "order" of
records any more, so you can't try to delete the "three top ones" unless you
have a criterion you can use.

Tell us about the data, and we may be able to suggest a query that will do
what you seek.
 
I did mention that they were the headers from the Main Frame report. The headers are useless
information in a database. What I was looking for is the VBA command statement to do that.

I am at a loss at to what else I can say?

If I wanted to delete record #1 with VBA what would the command be?
 
Eagle One,

PMFJI here. To paraphrase Ken's comments, there ain't no such thing as
"record #1". You have to tell us how you can identify/distinguish
record #1 (and the other "useless information") based on *the data* they
contain.

So what do they look like? Specific examples please?
 
MS,

The concept of MVP's is outstanding. For those who earn it and maintain
there status and an MVP based on actual help delivered - kudos.

Unfortunately the Access groups do not even come close to the quality of
real help that occurs in many other NG's - especially in Excel. Frankly, the
activity in the Access news groups related to newer users is far more
intimidating than necessary.

For sure no MVP gets paid. But let us be perfectly clear that being an MVP
is a currency of its own. The MVP get instant recongition and clout with
which they leverage into their private consulting practices. Therefore, I do
not agree with the concept of "I work for no pay" only Mother Threasas' do
that.

All one has to do is locate in this thread all the substantive answers which
give the newer user a scrap of knowledge to further a project. Answer there
are none!

Is this the intent of the concept of MVP? I think not.
 
There's a difference between getting the answer you want and getting an
answer that helps.

The answers provided so far are telling you that data in Access tables does
not have an inherent "row1, row2, ..." numbering unless you give it one.

You want to delete "the first three rows". Fine. How will you tell Access
which ones are the first three?

And if the folks over in the Excel newsgroups can give you a way to do what
you want in Excel, go for it!

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

"EagleOne@microsoftdiscussiongroups"
 
EagleOne@microsoftdiscussiongroups said:
All one has to do is locate in this thread all the substantive answers which
give the newer user a scrap of knowledge to further a project. Answer there
are none!

Hmmm, not sure about that. I can see some. Not all that difficult to
locate either.

I also see requests for you to provide further information, in order for
the helpers to help better. Which you have declined to do.
 
Back
Top