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

Problem with Currency Input.

Status
Not open for further replies.

Syerston

Programmer
Jun 2, 2001
142
GB
On one of my pages the user is required to add a currency value. This value then has the "CCur" function applied and
is added to a SQL string.

The problem is if the user decides to add a £ before the number it returns an eror.

Is there a way around this. John
 
Simply run a replace function on the amount to replace the £ with nothing:
Code:
mymoney = Request.Form("whatever")
mymoney = Replace(mymoney,"£","")
tada! You may want to use the character code for £ to be safer, but it should work anyway as it is a recognized character.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top