Barclays Bank Statements

forman

Registered User.
Local time
Today, 23:41
Joined
Jul 30, 2002
Messages
12
Hi all

Barclays give me the feature of downloading my statements in csv format.

There are several fields, but the important being 'Amount'. I've imported into a table and added a 'debit' and 'Credit' field.

So far so good

When Barclay's data comes down debits are shown with a - (negative) before the amount.

What I'm trying to do is check the 'Amount' field, if it's a positive figure set the 'Credit' field to the same amount (which I've done) but, if it's a negative figure set the 'Debit' field to the same amount without the - (negative)

Here's what I've got so far :

Private Sub Negatives_Click()

If [Forms]![frm_Bank_Account]![Amount] > 0 Then
Forms![frm_Bank_Account]![Credit] = [Forms]![frm_Bank_Account]![Amount]

Else: Forms![frm_Bank_Account]![Debit] = [Forms]![frm_Bank_Account]![Amount] + [Forms]![frm_Bank_Account]![Amount]


End If
End Sub

Which just makes the negative number double the negative, not zero.

Any ideas please

Thanks

Alan
 
Use the Abs() function.
 
Thanks

Thanks Paul

Super-fast and spot on, it's working

Alan
 

Users who are viewing this thread

Back
Top Bottom