Combination of data from two field (1 Viewer)

racdata

Registered User.
Local time
Today, 14:41
Joined
Oct 30, 2002
Messages
74
Hi all
I have a table with data like
Field 1 = Ref_No (IM1006/0548)
Field 2 = Loc (CBUS)

I want to combine these two fields in a separate field

Must look like this
Field LocNo = CBUS0548
 

lightray

Registered User.
Local time
Today, 23:41
Joined
Sep 18, 2006
Messages
270
Use something like LocNo: Loc & Right([Ref_No],4) in a query
or =[Loc] & Right([Ref_No],4) in Control Source ;) lightray
 

seth_belgium

WoW-Addict
Local time
Today, 13:41
Joined
Oct 4, 2005
Messages
175
Yep, above sollution will work provided that the /xxxx is always 4 characters. If not, you'll get faulty results.

Use this code to be absolutely sure:

LocNo: [Field 2] & Mid([Field 1];InStr(1;[Field 1];"/")+1;Len([Field 1])-InStr(1;[Field 1];"/"))
 

Users who are viewing this thread

Top Bottom