Concatenate two fields....

YouMust

Registered User.
Local time
Today, 11:46
Joined
May 4, 2016
Messages
106
i have two fields from a linked database that I'd like to join.

I've put this in the control source but i only get the first [PATH] and not the [FILE] in the output this is what I'm using:

=[PATH] & [FILE]

I get the same result if I try to do this in a query:

FULLPATH: [Path] & [FILE]

i only get PATH outputted.

any idea?
 
Hi. What does [FILE] contain?
 
OK give us an example of both the path and file combination
I don't want to look at an external link to do so.
 
hows this?

PATH=\\SPRINT2\REGISTER\HB\HB101943\
FILE= HB101943.PDF

=[PATH] & [FILE]


\\SPRINT2\REGISTER\HB\HB101943\HB101943.PDF

but i just get
\\SPRINT2\REGISTER\HB\HB101943\
 
Hi. What do you get with either of these?

=[FILE]

or

=IsNull([FILE])
 
Last edited:
=[FILE] I get the expected FILE output HB101943.PDF

=IsNull([FILE]) returned 0

Thanks for your help guys
 
=[FILE] I get the expected FILE output HB101943.PDF

=IsNull([FILE]) returned 0

Thanks for your help guys
I'm thinking maybe there's a line feed character in there? Try expanding the Textbox to show two rows. Does that help?
 
they were placed in the pervasive database by Globalshop solutions ERP software
 
they were placed in the pervasive database by Globalshop solutions ERP software
So, I am guessing we're not trying to modify them, correct? You just wanted to display them correctly, right? If so, we'll need to determine first what it is. Can you try the following, please?

=InStr([PATH],Chr(13))

and

=InStr([PATH],Chr(10))
 
As a line feed is normally two characters, try this
Code:
FullPath: Left([Path], Len([Path])-2) & [File]
 
as a line feed is normally two characters, try this
Code:
fullpath: Left([path], len([path])-2) & [file]

doesnt seem to work output=
Code:
\\sprint2\register\hb\hb101943\                                                                                                                                                                                                                         hb101943.pdf
 
OK I'm just going out. Can you test Len(Path) and compare with the numbers of printable characters in the same string. If there is a difference, replace the -2 with the actual difference obtained
 
=InStr([PATH],Chr(13)) = 0

=InStr([PATH],Chr(10)) = 0

If I use trim it shows fine (no additional lines) but i cant get it to concatenate:
https://imgur.com/a/MpRdifY
If both those tests failed, then it's not a line feed or a carriage return character. Just as another test, take one of the paths and count the number of visible characters in it. Then, try the following test:


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


Where X is the number of characters you counted.
 
Code:
\\SPRINT2\REGISTER\HB\HB101943\HB101943.PDF

that seems to work!!

Will this work for all PATH lengths ?
 
If both those tests failed, then it's not a line feed or a carriage return character. Just as another test, take one of the paths and count the number of visible characters in it. Then, try the following test:


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


Where X is the number of characters you counted.

I'll give that a go right away
 
If both those tests failed, then it's not a line feed or a carriage return character. Just as another test, take one of the paths and count the number of visible characters in it. Then, try the following test:


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


Where X is the number of characters you counted.

here we go:

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


#NAME?
 

Users who are viewing this thread

Back
Top Bottom