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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |