Actually, it's part of an import process that downloads bank statements and
populates a table with all the various transactions. The database then
crunches the numbers, which need to be all positive values. But the
different banks are not consistent in how they represent the amounts - some
are negative (2,483.39), some are positive $2,483.39.
This seems to do the trick:
UPDATE tblTransactions SET Amount = Abs(Amount) WHERE Amount < 0
Thanks to all who replied - I appreciate the help!
"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"deko" <dj****@hotmail.com> wrote in news:ONjHb.2907$NJ7.1857
@newssvr29.news.prodigy.com:
Is there an easy way to make all negative values positive in a
particular table?
I've been experimenting with this:
Dim rst As DAO.Recordset
Set rst = db.OpenRecordset("tblNegValues")
Do
If rst!Amount < 0 Then rst!Amount = rst!Amount - (rst!Amount * 2)
Loop
Is there a better way?
I suppose (whimsically), that you are storing a calculated field if you do
this, and that you should leave your data as it is, and simply use and/or
display the absolute value of these values.
--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)