469,602 Members | 1,686 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

delete query prob

I am trying to delete the data from 4 fields from a record but leaving the
ScheduleDetailsID untouched.

Even if I take out the [Schedule Details].ScheduleDetailsID from the delete line
it comes back

DELETE [Schedule Details].CustomerID, [Schedule Details].Numberofusers,
[Schedule Details].Priceuser, [Schedule Details].Activitydetail, [Schedule
Details].ScheduleDetailsID
FROM [Schedule Details]
WHERE ((([Schedule
Details].ScheduleDetailsID)=[Forms]![Reservations]![Reservations Time
Subform].[Form]![schid]));

What am I missing ?
TIA
David B

Nov 12 '05 #1
4 1158
If you want to change data in only 4 fields of a record, try an Update Query
instead to update these field to Null.

--
Wayne Morgan
Microsoft Access MVP
"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message
news:bt**********@newsg4.svr.pol.co.uk...
I am trying to delete the data from 4 fields from a record but leaving the
ScheduleDetailsID untouched.

Even if I take out the [Schedule Details].ScheduleDetailsID from the delete line it comes back

DELETE [Schedule Details].CustomerID, [Schedule Details].Numberofusers,
[Schedule Details].Priceuser, [Schedule Details].Activitydetail, [Schedule
Details].ScheduleDetailsID
FROM [Schedule Details]
WHERE ((([Schedule
Details].ScheduleDetailsID)=[Forms]![Reservations]![Reservations Time
Subform].[Form]![schid]));

What am I missing ?
TIA
David B

Nov 12 '05 #2

"David B" wrote
I am trying to delete the data from 4
fields from a record but leaving the
ScheduleDetailsID untouched.

Even if I take out the
[Schedule Details].ScheduleDetailsID
from the delete line it comes back


DELETE Queries, by definition, remove entire Records from a Table. To do so,
they must identify the Record, so that is why the key Field is being
inserted into your Query.

UPDATE queries are used to modify the information in Fields in Records in
the Table, which is what you want to do. Simply set the value of the Field
to its Default Value, if there is one, or to Null.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #3
"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message news:<bt**********@newsg4.svr.pol.co.uk>...
I am trying to delete the data from 4 fields from a record but leaving the
ScheduleDetailsID untouched.


If you're trying to delete the contents of some of the fields in a
record instead of just deleting the entire record, use an update query
instead.
Nov 12 '05 #4
Thanks for the replys. update query doing the job fine.
DB
Pieter Linden <pi********@hotmail.com> wrote in message
news:bf**************************@posting.google.c om...
"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message

news:<bt**********@newsg4.svr.pol.co.uk>...
I am trying to delete the data from 4 fields from a record but leaving the
ScheduleDetailsID untouched.


If you're trying to delete the contents of some of the fields in a
record instead of just deleting the entire record, use an update query
instead.


Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dishan Fernando | last post: by
2 posts views Thread by Joe Del Medico | last post: by
3 posts views Thread by Kevin M | last post: by
1 post views Thread by Matt | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.