Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2006
    Thanked 0 Times in 0 Posts

    Delete blank rows (Access 2000)

    I want to delete all the blank rows in the field Field1 but i get a syntax error.Could you tell me where the error is ?
    Public Function DeleteBlankRows()
    Dim sql As String
    sql = " DELETE Garden.*, Gardenr.Field1 FROM Garden WHERE WHERE Field1 = 0"
    CurrentDb.Execute sql

    End Function

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Delete blank rows (Access 2000)

    The word WHERE is repeated. It should iccur only once.

    You should create the query in design view first, test that it works correctly, then select View | SQL to see the SQL statement. You can remove the line ends, then copy the SQL string into your VBA code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts