WHOA! STOP! CEASE! DESIST!
That method will delete rows of data. You DO NOT want to use a delete
query
to clear a column. You want to use an UPDATE query and set the column's
(field's) value to null.
Open a new query
-- Select your table
-- Double click on the name of the column you want to delete all the data
from
-- Select Query: Update from the menu
-- Type NULL into the Update "cell" under the column
-- Select Query: Run from the menu
Alternative is to use the Find and replace directly on the table
-- Put the cursor in the field you want to delete
-- Select Edit: Replace from the menu
-- Enter * in the Find field
-- Leave the Replace field blank
-- Use the buttons to find and replace.
As stated earlier make a copy of your table (or the entire database)
before
you do this. That way you can get back to where you were if something
goes
wrong.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
Wayne-I-M said:
What looks like an excell column in your table is (in access) a field.
So if you have
ID
1stName
Surnname
HairColour
DateOfBirth
In your table the DateOfBirth will be shown in a "column"
To delete this information you could use a delete query. They are
quite
simple BUT DO A BACKUP FIRST.
Open a new query bring in the table you want to work on.
Double click the field. In the criteria row insert the criteria - so
if
you
want to delete all Johns. Put "John" in the criteria row.
If you want to delete everyone older than me (a very young 46) double
click
the date of birth field and in the criteria row put
DateDiff("yyyy",[CDDateofBirth],Date())-IIf(Format([CDDateofBirth],"mmdd")>Format(Date(),"mmdd"),1,0)>46
Or if you want to delete people with red hair and 1st name Kelly put
both
of
these fields in the query and then add details to both criteria.
There are a limitless amount of criteria you can use.
In the query type drop down select delete query then click the big red
!
at
the top of the screen - AFTER YOU HAVE DONE A BACKUP (just in case)
Good luck
--
Wayne
Manchester, England.
:
Hi there,
Major 1st timer here. Dappling my feet a bit. I have been asked to
clean
up
some tables for the upcoming year. and i have a very basic question.
How do you delete data in a column without deleting the setting for
that
column in the table. In excel i can easily select the 200 entries and
hit
delete. I can't seem to just select the data in one column without
getting
all the other data in column a:g
So basic i know. Thank you.