Code to delete rows

  • Thread starter Thread starter Ivor Williams
  • Start date Start date
I

Ivor Williams

A month or so ago, I posted a question about what code I could use to
automatically remove rows in a spreadsheet imported from QuickBooks in which
a cell value is null or blank. I did get a response and the suggested
solution worked perfectly. Since then, I've had to format my hard drive and
lost the code. If the original respondent or anyone else can help with this,
I'd appreciate it.

Ivor
 
Right after you import the spreadsheet run this code:

docmd.runsql "delete from MyTable where MyField is null;"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top