Re: Need help converting a Sined field



Hi Gene,

if you are wanting the DATA TYPE of the resulting colum to be specified, you can use a data conversion function such as

cLng -- convert to Long Integer (pos and neg ... BIG whole numbers)
cInt -- convert to Integer (limit 32K positive or neg)
cCur -- convert to currency (pos and neg)
etc

about the only numeric data type in Access that is not signed is byte, which is only good for 0-255

if you want to DISPLAY the column in a particulat format:

turn on the properties window in the design view of the query (right-click anywhere on query layout and choose Properties from shortcut menu)

once the properties window is showing, you can type a format for your number by clicking in the appropriate column and filling the format property (if you choose from the drop-list, you can also specify the Decimal property -- specifying Decimal without Format has no effect).


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Gene wrote:
I'm sure its already been posted but I wasn't able to find anything on this. I have a table that has a field "Unit Price" which is a sined field. I need to convert the field to regular number or even better an implied decimal(eg., 10058=100.58) But dont worry too much about that. Just need a query or a way to convert the sined field into a large interger. Thanks advance.
Gene
.



Relevant Pages

  • Re: How to format values in datagrid/dataset
    ... > which is the result of one double (data type) field divided by another ... > property twhere I can use the Format() function or some other way to ...
    (microsoft.public.dotnet.languages.vb)
  • Re: what function to use to convert date format in query?
    ... The Format function converts a date to a string, ... you specify, which is why you're getting a different data type. ... Thanks a lot for the help, Jana. ...
    (comp.databases.ms-access)
  • Re: what function to use to convert date format in query?
    ... The Format function converts a date to a string, ... you specify, which is why you're getting a different data type. ...
    (comp.databases.ms-access)
  • Re: Need performance help
    ... Monitor utility output to Comma Separated Value format files. ... At least one CSV file must be specified. ... the matching parameters from all the files are shown on the same chart. ... specify the commands on the command line. ...
    (comp.os.vms)
  • Re: Text changes after .........
    ... Instead of Val you should use Csng or better still change to using the Currency data type (instead of the Single data type) and then use CCur to convert your string data. ... Also, the reason your second choice of Format function appears to be working is simplky because you have not included a "thousands seperator" in it, but you'll have problems in other areas if you continue to use Val for conversions and Singles for your values. ... By the way, it is usual to use the TextBox's Validate event rather than its LostFocus event for validating entries, because the Validate event occurs *before* the TextBox actually loses focus and you can cancel the shift of focus very easily just by setting the Cancel parameter to the appropriate value if your code doesn't like whatever the user has input. ...
    (microsoft.public.vb.general.discussion)

Loading