Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does Combo.value change from integer to numeric?
Message
From
12/08/2000 01:06:30
 
 
To
11/08/2000 21:35:25
Jill Derickson
Software Specialties
Saipan, CNMI
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00404262
Message ID:
00404293
Views:
10
>Agencydefs.Code is an integer field
>
>With these settings, AgencyChoice.Value is an integer.
>
>If I change ControlSource to IncomingCases.AgencyCode (AN INTEGER FIELD), AgencyChoice.Value becomes a numeric value with 2 decimal places.
>

he problem is that a property takes on the data type of a memvar, not of a field; while there is a field Integer datatype, there is no memvar datatype; the net result is that the value will be type N.

From a practical perspective, memvars acquire one of two numeric datatypes; an N, B, I or F field will be stored to a memvar of type N; the only numeric type that isn't stored to an N is currency (Y) data, which is always expressed as a currency memvar. Use of the currency type has side-effects that may not be what you expect regarding precision and rounding; any currency value in an expression will force the entire result of the calculation to take on the currency data type, with the rounding and precision behavior of a currency datatype, unless all currency expressions are explicitly converted to a numeric type use MTON().
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform