Store a Value to specificly numeric and a question about Value of txtBox 
Author Message
 Store a Value to specificly numeric and a question about Value of txtBox

Is there a way to specificly store a valiable to a numberic value? Does this
make sence?

I have a txtBox where the user keys in the 'Starting check number'. The
keyed entry is stored in the thisform.txtbox.value, right? I need this value
to be a numeric value so I can
display in a enabled=.F. txtBoxEnd what the last check is....

I have a record count that is 2
The starting check is keyed in ie: 1000
so 1000+2(record count)-1
This would put 1000 in the starting check and 1001 in the ending check.
I have an if statement that compensates for only one check but I seem to be
having datamismatch errors in the 1000+2(record count)-1.

please help,

Jonathan Morningstar



Sun, 26 Nov 2000 03:00:00 GMT  
 Store a Value to specificly numeric and a question about Value of txtBox

If you assign a numeric value to your TextBox.Value property, the value the
user enters will be a number. You can do this by putting 0 (zero) in the
value property in the text box's property sheet.

--
Joshua Weiss
Boston Microcomputer Consulting
http://emporium.turnpike.net/~bmc

Remove X's when replying

Quote:

>Is there a way to specificly store a valiable to a numberic value? Does
this
>make sence?

>I have a txtBox where the user keys in the 'Starting check number'. The
>keyed entry is stored in the thisform.txtbox.value, right? I need this
value
>to be a numeric value so I can
>display in a enabled=.F. txtBoxEnd what the last check is....

>I have a record count that is 2
>The starting check is keyed in ie: 1000
>so 1000+2(record count)-1
>This would put 1000 in the starting check and 1001 in the ending check.
>I have an if statement that compensates for only one check but I seem to be
>having datamismatch errors in the 1000+2(record count)-1.

>please help,

>Jonathan Morningstar



Sun, 26 Nov 2000 03:00:00 GMT  
 Store a Value to specificly numeric and a question about Value of txtBox

Jonathan,

I didn't understand your question but if you want to convert a
character variable to a numeric variable you could do the following:
  lnNmbr = VAL(lcNmbr)

-myron kirby-
Independent Consultant

===========================

Quote:

>Is there a way to specificly store a valiable to a numberic value? Does
this
>make sence?

>I have a txtBox where the user keys in the 'Starting check number'. The
>keyed entry is stored in the thisform.txtbox.value, right? I need this
value
>to be a numeric value so I can
>display in a enabled=.F. txtBoxEnd what the last check is....

>I have a record count that is 2
>The starting check is keyed in ie: 1000
>so 1000+2(record count)-1
>This would put 1000 in the starting check and 1001 in the ending check.
>I have an if statement that compensates for only one check but I seem to be
>having datamismatch errors in the 1000+2(record count)-1.

>please help,

>Jonathan Morningstar



Sun, 26 Nov 2000 03:00:00 GMT  
 Store a Value to specificly numeric and a question about Value of txtBox

Have you tried the val() function?

--
Donald

~~~~~~~~~~~~~~~
"For every complicated problem there is a simple solution
  --and it is wrong." -- H. L. Mencken

Quote:

>Is there a way to specificly store a valiable to a numberic value? Does
this
>make sence?

>I have a txtBox where the user keys in the 'Starting check number'. The
>keyed entry is stored in the thisform.txtbox.value, right? I need this
value
>to be a numeric value so I can
>display in a enabled=.F. txtBoxEnd what the last check is....

>I have a record count that is 2
>The starting check is keyed in ie: 1000
>so 1000+2(record count)-1
>This would put 1000 in the starting check and 1001 in the ending check.
>I have an if statement that compensates for only one check but I seem to be
>having datamismatch errors in the 1000+2(record count)-1.

>please help,

>Jonathan Morningstar



Sun, 26 Nov 2000 03:00:00 GMT  
 Store a Value to specificly numeric and a question about Value of txtBox

Quote:

> Is there a way to specificly store a valiable to a numberic value? Does this
> make sence?

> I have a txtBox where the user keys in the 'Starting check number'. The
> keyed entry is stored in the thisform.txtbox.value, right? I need this value
> to be a numeric value so I can
> display in a enabled=.F. txtBoxEnd what the last check is....

> I have a record count that is 2
> The starting check is keyed in ie: 1000
> so 1000+2(record count)-1
> This would put 1000 in the starting check and 1001 in the ending check.
> I have an if statement that compensates for only one check but I seem to be
> having datamismatch errors in the 1000+2(record count)-1.

> please help,

> Jonathan Morningstar

  You need to get the start number as a numeric memvar or convert it after it is
entered.

m.EndCheckNo=val(hisform.txtbox.value)+2(record count)-1



Sun, 26 Nov 2000 03:00:00 GMT  
 Store a Value to specificly numeric and a question about Value of txtBox

I'm assuming your text box is unbound, in which case it will return a character
string rather than a number.  Try using the VAL function to convert to a
number.  Also, I think you have left a * out of your expression. 2(recordcount)
is unlikely to work anywhere.

David.

Quote:

> Is there a way to specificly store a valiable to a numberic value? Does this
> make sence?

> I have a txtBox where the user keys in the 'Starting check number'. The
> keyed entry is stored in the thisform.txtbox.value, right? I need this value
> to be a numeric value so I can
> display in a enabled=.F. txtBoxEnd what the last check is....

> I have a record count that is 2
> The starting check is keyed in ie: 1000
> so 1000+2(record count)-1
> This would put 1000 in the starting check and 1001 in the ending check.
> I have an if statement that compensates for only one check but I seem to be
> having datamismatch errors in the 1000+2(record count)-1.

> please help,

> Jonathan Morningstar



Mon, 27 Nov 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Numeric field: how to distinguish between no value and 0 value

2. VAL for Numeric Value, STR for Character Value but what about DATETIME to a Numeric Value?

3. Returning values from Oracle Stored Procedure or Stored function to VFP 5

4. procedure return value not numeric if procedure not include return command

5. comparing a textbox value as numeric

6. Restoring Numeric Values To Default

7. VFP BIG BUG on numeric values

8. Numeric field values corrupted by Access / Excel?

9. Combo/Listbox: Numeric values?

10. Copy to TYPE DELIMITED rounds numeric values

11. VFP6 SELECT SQL and numeric values

12. Conversion From Numeric Value to Words for Check writing

 

 
Powered by phpBB® Forum Software