Update table from Result of Query of same table

G

Guest

Hi ;

I have written below query to find out what should be the responsibility
by looking to the part of the information on a field in my table ;

SELECT IIf(Left([Division Control No],2)="AA" Or Left([Division Control
No],2)="BB","X","Y") AS Responsibility FROM [Input Sheet];

I would like this field automatically added into the table (Input Sheet)that
i ran the query on .
I do not like to copy and paste the information manually every time i ran
the query .

Could someone let me know how can this be done .

Steve
 
J

John Viescas

You do not need to update the table. If you want all the fields from the
table and your calculated value, use:

SELECT [Input Sheet].*, IIf(Left([Division Control No],2)="AA" Or
Left([Division Control
No],2)="BB","X","Y") AS Responsibility FROM [Input Sheet];

Use that as the Record Source for any form or report that needs to display
the calculated Responsibility value.

--
John Viescas, author
"Building Microsoft Access Applications" (Coming Soon!)
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 

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