I am a novice Access 2002 user and I'd like to delete all rows where the "category" fields says "buyer" as I do not need this information in my Real Estate database.

For example, I tried setting a query in SQL view with these parameters:

DELETE FROM [dbRealEstate] WHERE [dbRealEstate].Category ="buyer"

But since this is a command and not really a query, I am wondering where to do this. I also am seeing people writing VBScript into Access, but am wondering where I can do this. I have extensive experience with VBScript but it has been several years since I've used it and I haven't ever paired it with Access.

Thank you,

11 Years
Discussion Span
Last Post by TJ Bowers

tools -> macro -> visual basic editor

or right click on a command button on a form and choose code builder if you want to do it that way


On the main access menu, choose queries/new/design view... when the query design window opens - the "SELECT TABLES" window appears - click CLOSE. The top line display changes. Click on the "SQL" item in the top row. You can enter your "command" (sql text) there. Then click on the "RED EXCLAMATION POINT" -- when means "RUN" ... that's all there is too it.


... or use design view. Select the table name from the SHOW TABLE list. Double left click on the field name CATEGORY. On the CRITERIA line under that field, type "buyer". Choose query type = Delete ... (look at buttons on top row)... This process writes the sql statment for you with correct syntax.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.