Deleting values in mutiple cells PLEASE HELP

G

Guest

I am a novice user of Access 2000 and I am desperate for help! I have to
delete the first 15,000 records of one column only. In excel I would simple
highlight the cells and press delete but obviously this doesn't work in
Access; it wants to delet the whole record, not just the one column. Is
there any easy way of doing this or do I have to do it one by one?????
 
J

John Vinson

I am a novice user of Access 2000 and I am desperate for help! I have to
delete the first 15,000 records of one column only. In excel I would simple
highlight the cells and press delete but obviously this doesn't work in
Access; it wants to delet the whole record, not just the one column. Is
there any easy way of doing this or do I have to do it one by one?????

Excel is a spreadsheet. Access is a database.

THEY ARE DIFFERENT! and require different logic. For one thing, Access
tables do not *have* "cells" - they have Records, where each record
consists of Fields. Secondly, you don't "delete" cells - you change
the value in the cell, you can only delete entire records.

It seems that what you want to do is update 15000 existing records to
replace the current contents of one field with NULL. The appropriate
tool is an Update Query.

First, BACK UP YOUR DATABASE - this change is permanent and you don't
want to lose your data to a mistake in the query!

Create a new Query based on your table. Apply whatever criteria you
need to select those records which should be updated (and note that
there ARE no 'row numbers' - you'll need criteria referencing fields
in the table). Select the field that you want to blank out.

Change the query to an Update query using the query type tool, or the
Query menu option. On the Update To line under the field, type

NULL

just like that - no quotes, no punctuation.

Run the query by clicking the ! icon.


John W. Vinson[MVP]
 
G

Guest

Thanks John, would you mind helping just a bit more with my query. The
defintion of what I want to do is "if the value in column X = Null then
delete the value in column Y. Can you please tell me how I would do this?
 
G

Guest

Hi John, I can't believe it, I actually got it to work. I can't thank you
enough!!! I was going to sit here and manually delete 15000 records you have
saved me a day's work!!

Kate
 
J

John Vinson

Hi John, I can't believe it, I actually got it to work. I can't thank you
enough!!! I was going to sit here and manually delete 15000 records you have
saved me a day's work!!

<g> That's a delight to hear. Glad to have been able to trade 30
seconds of my time for a day of yours!

Get to know Queries. They are the bedrock of any Access application.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top