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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append Rounding Problem

Status
Not open for further replies.

kcmark

Technical User
Nov 2, 2002
63
US
I have created an append query that adds records to a database based on the data in a form. I have set up the query to round one of the calculated fields to 2 decimal places before it posts to the database.

When I am in design mode and preview the file, the field is correctly rounded (and truncated) and everything looks as it should - even when you click on the field. However, when it adds the record to the table it is updating the record with the unrounded amount. I am very puzzled, because the preview file looks correct (even when you click on the field - it is correctly truncated). Here is the code that rounds the calculated field:

Int((Amount*Rep_Rate_5*Pending_Pmt*100))/100)

Any idea what would be causing this?

 
I changed the field type in the table to fixed with 2 decimal places and it seems to have fixed the problem, but I am still very confused as to why it does this
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top