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

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

Post by 1aae » Fri, 14 May 2004 23:45:57


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..
 
 
 

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

Post by Michel Wal » Sat, 15 May 2004 23:47:32

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