Hello -
This should be an easy function to multiple all amounts if they
are negative values (< 0). however, i get an error message on the
db.openrecordset because it assumes that i want to count the number
of records that i have in the database. i just want to multiple the
myvalue by -1. what am i missing or doing wrong?
thanks in advance.
Dim db As Databases
Dim rst As Recordset
Dim I As Integer
Dim x As String
Dim MyValue
Set db = CurrentDb
'Set rst = db.OpenRecordset("tblBMOD-test")
MyValue = [Amount]
rst.MoveFirst
x = 0
Do Until rst.EOF
'multiply if MyValue is less than zero until all [ET Amount]
records are positive
'Integers need to be positive values.
If MyValue > 0 Then
MyValue = MyValue * -1
End If
rst.MoveNext
Loop
MsgBox "Finished!! All amounts are positive values.", vbOKOnly