I need to automate the process of deleting the first two rows of a table. I can't find any VBA examples of how to do this.
The end users will have no access to the tables so this process needs to be written in code.
I need to automate the process of deleting the first two rows of a table. I can't find any VBA examples of how to do this.
The end users will have no access to the tables so this process needs to be written in code.
Must use filter criteria to identify the rows.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I'm taking the data from a linked XLS sheet. The complete first two rows can be tanked. Won't filter criteria affect the entire column?
Why should it? The filter criteria should identify only the two records.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Ok, just so we are straight. Rows go from left to right, columns are up and down. When I transfer the data from the linked XLS sheet it brings the first two rows and there are 98 columns. What is deleted differs from column to column so one criteria won't work. Some data to be deleted is a sentence, others say #Num!. Do I need to type the sentences to be deleted as criteria?
Another option would be to use auto number and exclude the data from the first two but not having any luck resetting the autonumber in the receiving table.
Consistency is critical. If there is no consistent value to identify these two rows, how can you instruct Access via a DELETE sql action to remove them?
If you are appending records from the Excel link to an existing table - no, should not reset autonumber. What I think could do, is before the import, identify the last used autonumber value and then delete the first 2 records that follow. This should be programmable.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.