VAL function to do work out as expected

cheer

Registered User.
Local time
Tomorrow, 00:50
Joined
Oct 30, 2009
Messages
222
VAL function do NOT work out as expected

Module.jpg



Query above show the 3 fields:-

a) ModuleNo – data extracted from original table
b) ModuleNo1 – data generated from the ModuleNo field with function val(ModuleNo)
c) Revision – data extracted from original table

As you can notice, if ModuleNo consists of the letter ‘D’ follow by a number such as 1,2, and etc as highlighted in red square, there is a number “ZERO” appear at the end under the ModuleNo1 field. Total number of ZERO appearance depends on the number from the original field, ModuleNo.


For example,
a) 12345D1 => 123450
b) 12345D2 => 1234500
c) 12345D3 => 12345000 and so on

However, you won’t see this phenomenon in other values. Kindly advise what has gone wrong to VAL function and how to overcome the problem.

Thanks
 
Last edited:
hi cheer,

In mathematical analysis - specifically generalized functions - D is used to indicate a level of distribution (or something similar - it has been 20 years since i looked at this stuff:eek:). It is similar to the E used to describe the exponent of a large number eg 155584477788 is reduced to 1.55584E11. I am guessing the D is seen by access as the distributor of the number after it. You may need to use the instr() or SPLIT functions to give you the number before the D.
 

Users who are viewing this thread

Back
Top Bottom