Delete Rows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abdulkarim
    New Member
    • Apr 2008
    • 4

    Delete Rows

    How To Delete Rows Of A Table With Same Id In Access Database By Using Vb Code
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    What have you tried so far

    Comment

    • Trevor2007
      New Member
      • Feb 2008
      • 68

      #3
      how about opening your table in design view and clicking on your ID field mnd in the lower left cornor change allow duplicates to "NO"

      or if you realy want to use vba what about looping though the table ID # field for duplicates

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        Originally posted by abdulkarim
        How To Delete Rows Of A Table With Same Id In Access Database By Using Vb Code
        This doesn't make sense.

        What does "With Same Id" mean? Same as what?

        The basic answer is to run SQL with the following syntax. We need a more clear question before we can fill in the blanks.
        Code:
        Call DoCmd.RunSQL("DELETE FROM [YourTable] WHERE [ID]=???")
        Clearly, ??? needs to be set but we don't know how yet (without the question being properly set).

        Comment

        Working...