By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,204 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,204 IT Pros & Developers. It's quick & easy.

Delete Rows

P: 4
How To Delete Rows Of A Table With Same Id In Access Database By Using Vb Code
Apr 10 '08 #1
Share this Question
Share on Google+
3 Replies


Delerna
Expert 100+
P: 1,134
What have you tried so far
Apr 10 '08 #2

P: 68
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
Apr 10 '08 #3

NeoPa
Expert Mod 15k+
P: 31,494
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.
Expand|Select|Wrap|Line Numbers
  1. 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).
Apr 11 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.