H E L P

Naka

Registered User.
Local time
Today, 08:46
Joined
Jul 27, 2007
Messages
24
hey guys, i need to know if i can do something like this:

i want to in my query, create a new calculated field. this field, is calculated by taking the "quantity" field in my table, multiplied by the "status" field in my table. but the problem is, some of the entries in my status field have a letter in them, ie "N3" and most of them have just "5" or something. so to calculate the new field, titled "total prints". i need to multiply quantity and all of the single digit numbers in the status field minus the letters
 
Val("N3") will return a 0. If the string starts with a letter, Val returns a zero. Val also stops the first time it hits a non-numeric character, so Val("12AB34") would return 12.

Use this function, which will return only the numbers regardless of how they're mixed with characters. Look at response #8.
 
OOPs! apologies to all my readers :o I've only used Val for nnnddd type fields never realised the sting in the small print, read help and you'll see what I mean.

Brian
 

Users who are viewing this thread

Back
Top Bottom