You don't have to convert it to Access. You can runSQL in Access VBA if need be.However,you can build it with Access' Immediate If function in the query builder using the design view for help.something like this:Update TblASet credit = IIF(Credit>=credit3,credit4,IIF(Credit>=credit2,credit3,IIF(Credit>=credit2,credit2,credit1)))FROM TblA inner join TblB on TblA.SupplierID = TblB.SupplierIDWHERE tblA.ClientID = 6
and then this for table b:Update TblBSet credit = IIF(Credit>=credit3,credit4,IIF(Credit>=credit2,credit3,IIF(Credit>=credit2,credit2,credit1)))FROM TblA inner join TblB on TblA.SupplierID = TblB.SupplierIDWHERE tblA.ClientID = 6
The main problem you will have is that you can't update two tables at once, as told by Peso in your other post on this topic.http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=92182