Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2013, 03:00 PM
Registered User
 
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Use VBA in Access to delete blank rows based on criteria....help?

So I am working on a project where I import an excel file into Access, but when I do the importing( the tables in excel have the same tables headings as in Access) I tend to get a bunch of extra rows because in my excel file I have functions behind most of the cells, so that is why, even tho it appears to be empty, Access transfers the rows even tho nothing is actually entered into it.

So my question is, is there a way by using VBA in Access that I can automatically, once the excel file is imported, It could loop through all the rows in a specific table and delete an entire row based on specific criteria. Like if within a row there is an empty field, it will delete the whole entire row. This will save me a lot of time, instead of manually searching through the table for blank fields and deleting the row myself.

I do have knowledge working with VBA but im unsure of how to go about doing this, I was trying to use a DELETE SQL statement, but couldn't figure out how to do it properly since I need it to be In VBA.

Honestly any help will be majorly appreciated. Who wouldn't want to help a fellow programmer?





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete rows based on three fields on Gridview. atp2k3 BOOK: Professional ASP.NET 4 : in C# and VB 0 April 9th, 2011 11:11 PM
Access VBA Report Criteria anterior Access VBA 17 October 24th, 2007 07:13 AM
'Search Form' based on criteria Grafixx01 Access 7 May 4th, 2007 09:39 AM
select rows based on a criteria and paste ashu_gupta75 Excel VBA 2 July 30th, 2004 01:32 AM
Access VBA Delete Query Issue... snoopy92211 Access VBA 4 June 24th, 2004 03:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.