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

Val() function 4

Status
Not open for further replies.

uscitizen

Technical User
Jan 17, 2003
672
US
i have a query on a table. the table has three fields (to keep it simple), dosage amount, height and weight. all three are real numbers and can have decimal values on entry into the table. i want to export the three values as numbers (not text) into a csv text file. my query uses

expr1: Format([Dosage],"0.000") and expr2:Format([Height],"0.0") and expr3: Format([Weight],"0.0")

which yield output like "3435.320", "125.4", "65.0" (yes the quotations are surrounding the output).

what i need is to have the values exported w/o the surrounding quotations, so i reasoned i'd need to convert them to numeric again.

i unearthed a 'Val()' function which i placed outside the format functions which has sort of done what i wanted, but the output is getting exported with two significant digits in all instances, e.g. as

3435.32 125.40 65.00

when what i'm trying to get is

3435.320 125.4 65.0

to use the same specimen values.

i'm not really sure that the Val() function lets me control the precision. is there any other?

“The philosophy of the school room in one generation will be the philosophy of government in the next." --- Abraham Lincoln
 
hi boulderridge,

have a look at thread thread705-816256 (beginning on 4/13/04) when i added some of the more recent issues that arose in this one.



“The philosophy of the school room in one generation will be the philosophy of government in the next." --- Abraham Lincoln
 
Looks like you've made some great progress there. Perhaps we can sign off on this thread and I'll follow your progress on the new one! B-)
 
i feel like it's been a long time between vaca'ns about now.

thanks for all your great inputs/patience/bandwidth.

hope you got something out of this too, boulderridge!



“The philosophy of the school room in one generation will be the philosophy of government in the next." --- Abraham Lincoln
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top