Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with a weird miscalculation in my query

Status
Not open for further replies.

lifter10

MIS
Dec 3, 2003
45
US
I'm using Access 2002 and I have an update query that takes a value from the table and subtracts out the value of another table:

Update To: [Fix D4_ytd]![Consideration]-[Final]![Total]

Now I have several other columns in the update query updating different columns by the same amount [Total] and they work. Problem is the update query is adding or subtracting a couple dollars here and there for no reason for this specific column. On top of that my report displays another completely different number than what was updated. I'm having some serious problems here, can anyone help me out? I've tried switching data types, redoing my query, changing the values in the table, and nothing works.

Thanks in advance,

Chris
 
Can you post your UPDATE query?

What you have posted looks like a computed field in a query ... not an update of an existing field.
 
Here is my update query:

UPDATE Final INNER JOIN [Fix D5_ytd] ON Final.Cusip = [Fix D5_ytd].Cusip SET [Fix D5_ytd].Consideration = [Fix D5_ytd]![Consideration]-[Final]![Total], [Fix D5_ytd].[Gain/Loss] = [Fix D5_ytd]![Gain/Loss]-[Final]![Total], [Fix D5_ytd].[Total Gain/Loss] = [Fix D5_ytd]![Total Gain/Loss]-[Final]![Total], [Fix D5_ytd].[Interest & Dividends] = [Fix D5_ytd]![Interest & Dividends]+[Final]![Total]
WHERE (((Final.[Aloc Status Type Code])=5) AND ((Final.company)=getCompany()));


I am having problems with the Consideration only, the other fields work correctly and are set up the same way, this is why I'm confused.
 
are you sure there's not a null value somewhere?

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top