Formatting Question

I’m having some difficulty with Formatting.

I have a TextField that a user enters a value … let’s say it’s 40

I have a button that transfers that to a cell in a listbox and formats it to appear as $40.00

When I test display the contents of that cell (using msgbox) it appears as $40.00

I need to store that in a database as a value of just 40. It has to come from the ListBox cell.

How can I strip the formatting? I can’t seem to find specific “help” on this.

I tried using Val() but I end up with a zero.

Appreciate the help.

valuetostore as string = Str(val(replace(TextField1.Text, "$", "")))

If there are cents, they will be stored. If you want to strip cents altogether, use format.

PERFECT !! Thank you sir!