Click to See Complete Forum and Search --> : HELP WITH SQL?
paul
Sep 8th, 1999, 04:57 PM
I have a MS Access data base with a table named Orders I need to find all records with
status(Field in Table)"OPEN" after I find them I then need to change "OPEN" to "ORDERED" Can any one give me help on this?
Thanks
Elad22
Sep 8th, 1999, 06:12 PM
Write this in your code:
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE Orders SET Orders.Status = 'ORDERED' WHERE (((Orders.Status)='OPEN'))"
DoCmd.SetWarnings True
You could use the SQL UPDATE
Database.Execute "Update Orders set Orderstatus = 'ORDERED' where Orderstatus= 'OPEN'"
Database.Execute "Update Table set Field = NewValue where Field = OldValue"
------------------
Vincent van den Braken
EMail: azzmodan@azzmodan.demon.nl
ICQ: 15440110 (http://www.icq.com/15440110)
Homepage: http://www.azzmodan.demon.nl
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.