Update table from Result of Query of same table

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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)
 
Back
Top