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!

Unbound control and rounding to whole number

Status
Not open for further replies.

tbac

Technical User
Jun 16, 2003
59
US
I have an unbound form for the user to enter numbers, then they click on a button that updates a table based on those numbers. My problem is that there is an unbound control (text box) formatted as Fixed with 1 decimal place. When I click the button to update the table, the field on the table updates to the nearest whole number. How can I get the table to take the number as entered, with a decimal?
 
How is the field defined in the table ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
The field in the table is Single. But it doesnt seem to matter. For example, to check what is going on I created another unbound control on the form and added coding to the button to update that unbound control, which is set to fixed with one decimal place. When I enter 1.3 and click on the button, the other control shows '1', not '1.3'
 
I figured it out...I had a memory variable in the button code that was set to 'Long' instead of 'Single'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top