Concatenate two fields.... (1 Viewer)

theDBguy

I’m here to help
Staff member
Local time
Today, 10:37
Joined
Oct 29, 2018
Messages
21,480
here we go:

=Asc(Mid([PATH],[31]+1,1))


#NAME?
Don't enclose 31 in brackets. Simply try it this way:


=Asc(Mid([PATH],32,1))
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:37
Joined
Oct 29, 2018
Messages
21,480
my mistake. result is 32
Okay, 32 is a space character. That's probably why the Trim() function worked. So, you could try the following now.


=Trim([PATH]) & [FILE]


What do you get?
 

YouMust

Registered User.
Local time
Today, 10:37
Joined
May 4, 2016
Messages
106
Did you try my suggestion in post #16?


Yes that works!

will this work for length of text in PATH?


@DBguy

ah that worked i tried this before but i had plain text with rich text it removed the spaces after FILE!

Thank you to both of you both methods work.

now... what one should i use?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:37
Joined
Oct 29, 2018
Messages
21,480
Yes that works!

will this work for length of text in PATH?


@DBguy

ah that worked i tried this before but i had plain text with rich text it removed the spaces after FILE!

Thank you to both of you both methods work.

now... what one should i use?
Hi. Glad to hear you got it to work. Colin and I were happy to assist. Good luck with your project.
 

isladogs

MVP / VIP
Local time
Today, 18:37
Joined
Jan 14, 2017
Messages
18,242
Yes my method should work in all cases one you know the number of characters to deduct as it should be the same for each record.
Out of interest was it 4 characters? 2 for carriage return and 2 for line feed?

If both methods work, use whichever you prefer/understand
 

YouMust

Registered User.
Local time
Today, 10:37
Joined
May 4, 2016
Messages
106
FullPath: Left([Path], Len([Path])-219) & [File]

worked.

i understand the trim function better i would say.

thanks to both of you, always a great forum/users
 

isladogs

MVP / VIP
Local time
Today, 18:37
Joined
Jan 14, 2017
Messages
18,242
Well I'd never have guessed 219! Makes me wonder what you have in those 219 characters.
Trim removes spaces from the ends of a text string but AFAIK doesn't remove other non-printable characters. The strange thing is that you can't normally have spaces at the end of a string.

Anyway you now have a solution which is the main thing.

One more thing. If its acceptable to do so, you could run an update query on the path field and trim out those 219 spaces.
 

YouMust

Registered User.
Local time
Today, 10:37
Joined
May 4, 2016
Messages
106
the spaces maybe there for the ERP software for some strange reason, im reluctant to change any table/s as it may break their software.
 

Users who are viewing this thread

Top Bottom