turfbult
Aug 23rd, 2000, 01:49 PM
Hi all,
I'm still having trouble formatting my data correctly.
I have a access database with a numeric field "amount" which is set as number,standard,2 decimal places. I have a form with a textbox "amount" and the dataformat is set to number,2 decimals and 1000 seperator.
Firstly I want the form to display 0.00 when first loaded - I tried to set txtamount.text = 0.00, but it still just shows 0.
Secondly I want to insert exactly what the user enters into txtamount into my table. What happens now is that the user types in 5.56 - I then debug my code and in my insert statement I can see that it looks fine ie. "insert into client values 5.56", but when I go and read that record again it brings it back as rounded ie. client!amount = 6.
I tried using ccur(trim(txtamount.text)), but this still does not work.
And then lastly... when the user enters the amount on the form I want him to overwrite whatever is in txtamount.text and not "add-on" to it. ie. when the form loads it displays 0 in txtamount.txt, now I want the user enters 49 - what happens is that it just pust the 49 in front of the zero so it becomes 490. I also want an input mask so that whatever the user enters goes in BEFORE the decimal until the fullstop is pressed and then the user can input the decimals (hope this makes sense!!!??) How can I fix this without having to backspace on the zero and then typing what I want??
Sorry for the "long one", but if you can help me it'll be MUCH appreciated!!
Thanks.
I'm still having trouble formatting my data correctly.
I have a access database with a numeric field "amount" which is set as number,standard,2 decimal places. I have a form with a textbox "amount" and the dataformat is set to number,2 decimals and 1000 seperator.
Firstly I want the form to display 0.00 when first loaded - I tried to set txtamount.text = 0.00, but it still just shows 0.
Secondly I want to insert exactly what the user enters into txtamount into my table. What happens now is that the user types in 5.56 - I then debug my code and in my insert statement I can see that it looks fine ie. "insert into client values 5.56", but when I go and read that record again it brings it back as rounded ie. client!amount = 6.
I tried using ccur(trim(txtamount.text)), but this still does not work.
And then lastly... when the user enters the amount on the form I want him to overwrite whatever is in txtamount.text and not "add-on" to it. ie. when the form loads it displays 0 in txtamount.txt, now I want the user enters 49 - what happens is that it just pust the 49 in front of the zero so it becomes 490. I also want an input mask so that whatever the user enters goes in BEFORE the decimal until the fullstop is pressed and then the user can input the decimals (hope this makes sense!!!??) How can I fix this without having to backspace on the zero and then typing what I want??
Sorry for the "long one", but if you can help me it'll be MUCH appreciated!!
Thanks.