K kitty77 Registered User. Local time Yesterday, 19:26 Joined May 27, 2019 Messages 715 Sep 29, 2022 #1 I have a field called [Link] and the data looks like this... \customers\tomsmith\pdf\1234.pdf In a query, how can I create a field that removes everything up to the pdf? \customers\tomsmith\pdf Thanks
I have a field called [Link] and the data looks like this... \customers\tomsmith\pdf\1234.pdf In a query, how can I create a field that removes everything up to the pdf? \customers\tomsmith\pdf Thanks
theDBguy I’m here to help Staff member Local time Yesterday, 16:26 Joined Oct 29, 2018 Messages 22,541 Sep 29, 2022 #2 You could use InStrRev() to look for the position of the last "\" and then use Left() up to that position.
You could use InStrRev() to look for the position of the last "\" and then use Left() up to that position.
K kitty77 Registered User. Local time Yesterday, 19:26 Joined May 27, 2019 Messages 715 Sep 29, 2022 #3 Can you show me how that code would look in the query?
theDBguy I’m here to help Staff member Local time Yesterday, 16:26 Joined Oct 29, 2018 Messages 22,541 Sep 29, 2022 #4 kitty77 said: Can you show me how that code would look in the query? Click to expand... Maybe something like Code: Expr1: Left([FieldName], InStrRev([FieldName], "\")-1) (untested) Hope that helps...
kitty77 said: Can you show me how that code would look in the query? Click to expand... Maybe something like Code: Expr1: Left([FieldName], InStrRev([FieldName], "\")-1) (untested) Hope that helps...
K kitty77 Registered User. Local time Yesterday, 19:26 Joined May 27, 2019 Messages 715 Sep 29, 2022 #5 Works Great! One question though... The field [Link] is a hyperlink but when I use this code, it does not keep any hyperlink.
Works Great! One question though... The field [Link] is a hyperlink but when I use this code, it does not keep any hyperlink.
K kitty77 Registered User. Local time Yesterday, 19:26 Joined May 27, 2019 Messages 715 Sep 29, 2022 #6 Any way to make it a hyperlink too?
theDBguy I’m here to help Staff member Local time Yesterday, 16:26 Joined Oct 29, 2018 Messages 22,541 Sep 29, 2022 #7 kitty77 said: Any way to make it a hyperlink too? Click to expand... So, you want the hyperlink to go to the folder, correct? Not to the file, right?
kitty77 said: Any way to make it a hyperlink too? Click to expand... So, you want the hyperlink to go to the folder, correct? Not to the file, right?
K kitty77 Registered User. Local time Yesterday, 19:26 Joined May 27, 2019 Messages 715 Sep 29, 2022 #8 Correct.
theDBguy I’m here to help Staff member Local time Yesterday, 16:26 Joined Oct 29, 2018 Messages 22,541 Sep 29, 2022 #9 kitty77 said: Correct. Click to expand... How about? Code: FolderLink: "#" & Left([FieldName], InStrRev([FieldName], "\")-1) Hope that helps... PS. If you're displaying this on a form, you might have to set the IsHyperlink property to Yes.
kitty77 said: Correct. Click to expand... How about? Code: FolderLink: "#" & Left([FieldName], InStrRev([FieldName], "\")-1) Hope that helps... PS. If you're displaying this on a form, you might have to set the IsHyperlink property to Yes.