By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,824 Members | 2,410 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,824 IT Pros & Developers. It's quick & easy.

delete query prob

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a

"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

P: n/a
"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

P: n/a
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.