checking field not working anymore

Casperov

Registered User.
Local time
Today, 05:43
Joined
Nov 15, 2004
Messages
18
I have this piece of code, which up until today was working. However, today the txtJournalBalance does not equal 0, even though it is actually displaying 0.00 on the screen.

If Me!txtJournalBalance <> 0 Then
Me!cmdSubmit.Enabled = False
Else
Me!cmdSubmit.Enabled = True
End If

When I debug the code, the value appears as -7.125e or something like that. The data is coming from this query: Step 95 - qselFinalBalance...which basically calculates two numbers the total amount and number of transactions.

SELECT DISTINCTROW
Count(tblClass.LineNumber) AS CountOfLineNumber,
Sum(tblClass.Amount) AS SumOfAmount
FROM tblClass;

Heeeeeelp :confused:
 
Have you checked to see that someone hasn't errantly entered a negative value some where, where there should only be positive values?

kh
 
Hi Ken,

The query totals up the values (neg and pos) and it balances out to 0...but how come the value isn't being supplied to txtJournalBalance field properly?

The problem isn't the values that are being loaded into the system, it's how the system is handling the data. The form that the txtJournalBalance text box is being displayed on, is grabbing the data from the query: Step 95 - qselFinalBalance.

hmmmmmm... :confused:
 
I'm just stabbing in the dark here, but, are all your data types suitable for the values you store, etc?

kh
 

Users who are viewing this thread

Back
Top Bottom