Update queries

  • Thread starter Peter McCartney
  • Start date
P

Peter McCartney

Hello All! Thanking anyone for a reply.A97

I see with update queries once you run them it changes all records within
the table for that field.

Can you run an update query to change 1 specific record only?

Peter McCartney
 
J

John Vinson

Hello All! Thanking anyone for a reply.A97

I see with update queries once you run them it changes all records within
the table for that field.

Can you run an update query to change 1 specific record only?

One record, ten records, or ten thousand records, sure. Just include
Criteria on the fields which identify the records which you desire to
update. For instance, if there's a numeric Primary Key field and you
want to update some other field in the record with 123 as the Primary
Key, just put 123 on the Criteria line under that field; if you want
to update the salary of the person with EmployeeID 333-33-3333, just
put "333-33-3333" on the Criteria line under the EmployeeID field and
their new salary under the Salary field.
 
P

Peter McCartney

If I am using a bound form named [fchange] to enter that criteria would I
put: =[forms]![fchange]![rego] in the criteria section. As I want the user
to input the different criteria?

Peter
 
J

John Vinson

If I am using a bound form named [fchange] to enter that criteria would I
put: =[forms]![fchange]![rego] in the criteria section. As I want the user
to input the different criteria?

The Forms criterion should work fine. Just put a command button on
fchange to execute the query (you may want to have the code first
check that rego contains valid criteria).
 

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