A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Delete rows in access



 
 
Thread Tools Display Modes
  #1  
Old April 4th, 2006, 09:05 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Delete rows in access

Hi everybody,
I get a little problem maybe one of us can help me,
Every day I' get a download a "Shorts Report" of every number parts,
and this file in .txt is too big for excel and I work in access but I
need delete rows with the headers, footers, & others lines in the
table, Can us explain me how made a macro for this routine.
This is a example;

Reporte de Cortos de Material _040406 B
ID Field1 Field2 Field4 Field5 Field6 Field7 Field8
1 NP DESC Qty Short Lin
set Coust Date
2 NP DESC Qty Short Lin
set Coust Date
3 NP DESC Qty Short Lin
set Coust Date
4 Total
5 Total 2
6 Empty
7 Empty
8 NP DESC Qty Short Lin
set Coust Date
9 NP DESC Qty Short Lin
set Coust Date
10 NP DESC Qty Short Lin
set Coust Date

  #2  
Old April 6th, 2006, 10:17 AM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Delete rows in access

Armand,

You'll need some easy way to distinguish the "headers, footers, &
others" lines from your data lines. For example, perhaps any line in
which [Field2] = "DESC" is a header line, and you want to ignore it. Or
maybe if [Field4] = "Qty" instead of a number, you want to ignore it.

Perhaps you have alreay imported the data into a [Reporte de Cortos]
Table. If so, you might be able to write a "Delete Query" that will
delete any record in the Table in which [Field4] = "Qty", etc. Do you
think that that will do what you need? You could use one Query to
delete header records, another Query to delete footer records, and a
third Query to delete "others" records. You could put all three Queries
into one Macro, which you could run each day after importing the text
file into your Table.

If you haven't imported the data into a Table, you might write a Module
containing VBA code that will read each record from the *.TXT file and
add only the good ones to your Table. (Someone here can help you with
that, if you wish.)

-- Vincent Johns
Please feel free to quote anything I say here.

Armand wrote:

Hi everybody,
I get a little problem maybe one of us can help me,
Every day I' get a download a "Shorts Report" of every number parts,
and this file in .txt is too big for excel and I work in access but I
need delete rows with the headers, footers, & others lines in the
table, Can us explain me how made a macro for this routine.
This is a example;

Reporte de Cortos de Material _040406 B
ID Field1 Field2 Field4 Field5 Field6 Field7 Field8
1 NP DESC Qty Short Lin
set Coust Date
2 NP DESC Qty Short Lin
set Coust Date
3 NP DESC Qty Short Lin
set Coust Date
4 Total
5 Total 2
6 Empty
7 Empty
8 NP DESC Qty Short Lin
set Coust Date
9 NP DESC Qty Short Lin
set Coust Date
10 NP DESC Qty Short Lin
set Coust Date

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with delete duplicates query Tracey Running & Setting Up Queries 6 January 5th, 2006 09:28 PM
How to delete blank rows John Mansfield General Discussion 3 April 27th, 2005 11:48 PM
is Access 2003 any better than XP? Gorb General Discussion 4 November 11th, 2004 09:44 PM
Here's a shocker Mike Labosh General Discussion 2 October 26th, 2004 05:04 PM
Access XP Compared to Access 2003 Mardene Leahu New Users 1 October 1st, 2004 05:11 AM


All times are GMT +1. The time now is 09:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.