Re: deleteing query
- From: Ofer Cohen <OferCohen@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 2 May 2007 05:48:01 -0700
Thanks John,
It's a very good point
"John Spencer" wrote:
As Ofer Cohen said BACK UP YOUR DATA first..
If you should fail to enter a letter you could end up deleting every record
in your database that has a value in the field.
I would at least modify the WHERE clause of the query to
WHERE FieldName LIKE [Please Select a Letter] & IIF(IsNull([Please Select
a Letter]),"","*")
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
"Ofer Cohen" <OferCohen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F23817C3-2E71-4744-9FAA-D305233DE96E@xxxxxxxxxxxxxxxx
First Back up your MDB, so you can recover the data
You can try a Delete query with Like and wild card (*)
Delete TableName.* From TableName Where FieldName Like [Please select a
letter] & "*"
When the query run the user will be prompt with a message [Please select a
letter], and the query will delete all the records that the a specific
field
start with this letter.
--
Good Luck
BS"D
"h115x" wrote:
how can i delete all records in a table where the description starts with
a
specific letter?
- References:
- Re: deleteing query
- From: John Spencer
- Re: deleteing query
- Prev by Date: Re: Query doesn't always sort
- Next by Date: Re: showing specific names with certain dogs in query/form
- Previous by thread: Re: deleteing query
- Index(es):
Relevant Pages
|