Text Box with custom size (1 Viewer)

adi32

Registered User.
Local time
Today, 22:58
Joined
Dec 6, 2000
Messages
82
i have a field like this
W12,5 D100
W2,5 D100
i want to be visible the left size before the D100
ex W12,5
W2,5
how can i do that ?
 

RichO

Registered Yoozer
Local time
Today, 16:58
Joined
Jan 14, 2004
Messages
1,036
Is there simply a space separating the 2 sections?

You could show just the characters to the left of the space with:

Left$([MyField], InStr([MyField], " ") -1)
 

adi32

Registered User.
Local time
Today, 22:58
Joined
Dec 6, 2000
Messages
82
Thank you very much it works but I saw that I have and some records like
W7,4 without space after the number and this returns #error

Ex
W7,4 D12 gives W7,4
W7,42 D51 gives W7,42
W7,4 gives #error

I don’t know if this can be fixed

THANK YOU
 

RichO

Registered Yoozer
Local time
Today, 16:58
Joined
Jan 14, 2004
Messages
1,036
For records that have no space, try something like this

Left$([MyField], InStr([MyField] & " ", " ") -1)

This should fix the error problem.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 17:58
Joined
Feb 19, 2002
Messages
43,486
In the future you might consider not using a single field to hold two pieces of data. Properly normalizing your tables will eliminate little problems like this.
 

Users who are viewing this thread

Top Bottom