using query to change Value in field depend on another field value

  • Thread starter Thread starter 1aae
  • Start date Start date
1

1aae

Thank you
This is example:
Serial PName field1 Field2
1 ahd 100 10
2 sdf 100 12
3 sdfsd 100 13
4 sdf 100 14
5 asd 100 10
What I want
If you Find (2 or 3 or 4 or ….) in (Field2) the (same value) here in my
example (10) give them the same value of the First (Serial) Value where
condition is field1 = 100
My example will be
Serial PName field1 Field2
1 ahd 100 10
2 sdf 100 12
3 sdfsd 100 13
4 sdf 100 14
1 asd 100 10
this Is what I want:
More information if you need to sort I will need to sort PName..
 
Hi,



UPDATE tableName
SET Serial= DMIN('Serial', 'tableName', 'Field2=' & Field2 )


(make a backup first, or test on dummy data before applying it on real
data).

Hoping it may help,
Vanderghast, Access MVP
 
Back
Top