Only want update a part of records?

G

Guest

Hi,

I use a update query to update a field(yes/no) value to "yes",
I want to know is it possible to change the querry,
it can ask me how many records I need to update before
running the querry.
Hope someone can help!!

Thank!!
Gary
 
F

fredg

Hi,

I use a update query to update a field(yes/no) value to "yes",
I want to know is it possible to change the querry,
it can ask me how many records I need to update before
running the querry.
Hope someone can help!!

Thank!!
Gary

So you have 1000 records and you wish to update 50. Which 50?
How is the computer supposed to know?
Why not expand upon this post and let us know, in a bit more detail,
what it is you are trying to do.
 
J

John Vinson

Hi,

I use a update query to update a field(yes/no) value to "yes",
I want to know is it possible to change the querry,
it can ask me how many records I need to update before
running the querry.

If you're assuming that updating 10 records will update the "first 10
records" - think again! Access Tables *have no order*. They're an
unordered "bag" of data.

An Update query can have criteria selecting records on the basis of a
value in some field or fields in the table, but applying the TOP
VALUES property to a Query will prevent it from being updateable.

If you don't care which records get updated - "just update any 10" -
you may need to use VBA code to do so.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
P

ppm

The table contain warehouse goods information, every record have a carton id
field,
the yes/no field is to identify the goods is leave the warehouse or not.
Usually we don't care which carton id is leave, so everyday just only update
how many
goods is leave.

Gary
 
J

John Vinson

The table contain warehouse goods information, every record have a carton id
field,
the yes/no field is to identify the goods is leave the warehouse or not.
Usually we don't care which carton id is leave, so everyday just only update
how many
goods is leave.

That sounds very risky to me. How on Earth would you do any sort of
audit, if you don't know which cartons are in or out? Suppose the
computer says that there are 50 cartons out, and you go into the
warehouse, count them, and find that there are 65 missing. Clearly the
computer is wrong, but how would you be able to find out what's
checked out legitimately, and what's been stolen, say?


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
J

John Spencer (MVP)

John,

I beg to differ. When I apply a TOP n predicate to a query, the query is still
updateable - provided it was updateable before I applied the Top predicate.

Respectfully,

One of the other Johns
 
P

ppm

Because we use another program to control our warehouse,
we only use the access link to that program database for statistics.

Gary
 
J

John Vinson

John,

I beg to differ. When I apply a TOP n predicate to a query, the query is still
updateable - provided it was updateable before I applied the Top predicate.

OOPS! Thanks John; I was working from an (obviously flawed) old memory
and didn't check. Thanks for the catch!

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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