954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Basic Access Question

Hello,

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,
Eric

ekeyte
Newbie Poster
3 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

yeah, you could use VBA (basically VB6 but in access) or maybe a macro?

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

Where do I enter a macro or use VBA?

ekeyte
Newbie Poster
3 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

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

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

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.

TJ Bowers
Newbie Poster
2 posts since Feb 2007
Reputation Points: 10
Solved Threads: 0
 

... 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.

TJ Bowers
Newbie Poster
2 posts since Feb 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: