I store hyperlinks as text in a table like this:
Invoice11-21-2003.pdf#file://P:\Finance\Pref Vendors\Receipt s\Invoice11-21-20
03.pdf
I need to run a report that lists the documents - or whatever the display
text of the hyperlink is.
As it is now, the entire hyperlink appears in the report - I'm trying to
display just the document name.
I've used this elsewhere to get the display text:
astrFile = Split(varFile, "\")
strDt = astrFile(UBound (astrFile))
But how to get this to work with the report?
The report has a query for a RecordSource, so I'm limited to using code
within the text box on the Report that is bound to the query. Is there a
way to use the IIf Function in the text box with the InStr Function? or
perhaps something like...
=IIf (astrFile = Split(varFile, "\"), strDt =
astrFile(UBound (astrFile)))
I've tried to use code in the Report's module, but that fails because the
textbox is bound to the query which gets the hyperlink text string from the
table.
any suggestion welcome...
Thanks! 3 9483
If you're using a newer version of Access (not ver 97) you can use
the InStrRev() function to get the last occurance. Otherwise you
have to loop.
strOut = Right([myField], Len([myField]) - InStrRev([myField],"\")
If you are using Access 97, post back and request the LastInStr()
function code. I'm not sure who wrote it, but it's been around forever.
--
Danny J. Lesandrini dl*********@hot mail.com http://amazecreations.com/datafast
"deko" <dj****@hotmail .com> wrote ... I store hyperlinks as text in a table like this:
Invoice11-21-2003.pdf#file://P:\Finance\Pref Vendors\Receipt s\Invoice11-21-20 03.pdf
I need to run a report that lists the documents - or whatever the display text of the hyperlink is. As it is now, the entire hyperlink appears in the report - I'm trying to display just the document name.
I've used this elsewhere to get the display text:
astrFile = Split(varFile, "\") strDt = astrFile(UBound (astrFile))
But how to get this to work with the report?
The report has a query for a RecordSource, so I'm limited to using code within the text box on the Report that is bound to the query. Is there a way to use the IIf Function in the text box with the InStr Function? or perhaps something like...
=IIf (astrFile = Split(varFile, "\"), strDt = astrFile(UBound (astrFile)))
I've tried to use code in the Report's module, but that fails because the textbox is bound to the query which gets the hyperlink text string from the table.
any suggestion welcome...
Thanks!
I would use HyperlinkPart() to get either the address, display text, or both. I
could then use Instr() on the results of the HyperlinkPart() function
deko wrote: I store hyperlinks as text in a table like this:
Invoice11-21-2003.pdf#file://P:\Finance\Pref Vendors\Receipt s\Invoice11-21-20 03.pdf
I need to run a report that lists the documents - or whatever the display text of the hyperlink is. As it is now, the entire hyperlink appears in the report - I'm trying to display just the document name.
I've used this elsewhere to get the display text:
astrFile = Split(varFile, "\") strDt = astrFile(UBound (astrFile))
But how to get this to work with the report?
The report has a query for a RecordSource, so I'm limited to using code within the text box on the Report that is bound to the query. Is there a way to use the IIf Function in the text box with the InStr Function? or perhaps something like...
=IIf (astrFile = Split(varFile, "\"), strDt = astrFile(UBound (astrFile)))
I've tried to use code in the Report's module, but that fails because the textbox is bound to the query which gets the hyperlink text string from the table.
any suggestion welcome...
Thanks!
Great. Thanks for the tip - HyperlinkPart() is the ticket!
"Salad" <hi**********@r anch.com> wrote in message
news:3F******** *******@ranch.c om... I would use HyperlinkPart() to get either the address, display text, or
both. I could then use Instr() on the results of the HyperlinkPart() function
deko wrote:
I store hyperlinks as text in a table like this:
Invoice11-21-2003.pdf#file://P:\Finance\Pref Vendors\Receipt s\Invoice11-21-20 03.pdf
I need to run a report that lists the documents - or whatever the
display text of the hyperlink is. As it is now, the entire hyperlink appears in the report - I'm trying to display just the document name.
I've used this elsewhere to get the display text:
astrFile = Split(varFile, "\") strDt = astrFile(UBound (astrFile))
But how to get this to work with the report?
The report has a query for a RecordSource, so I'm limited to using code within the text box on the Report that is bound to the query. Is there
a way to use the IIf Function in the text box with the InStr Function? or perhaps something like...
=IIf (astrFile = Split(varFile, "\"), strDt = astrFile(UBound (astrFile)))
I've tried to use code in the Report's module, but that fails because
the textbox is bound to the query which gets the hyperlink text string from
the table.
any suggestion welcome...
Thanks! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: marcokrechting |
last post by:
Hi All,
I have a rather complicated problem.
I use following function to display a hyperlink:
a="<"+"a href='";
b3="<"+"a href='http://nww.";
L="</"+'a><br>';
function h(a){document.writeln(a)}
|
by: Keith Wilby |
last post by:
A2003, XP Pro.
I have a text box on a form. The text box is bound to a hyperlink field. I
want to use the contents of the text box in code so I'm assigning the
contents to a string variable. Typically, the contents would be:
T:\CSDI\Projects\Library\002\8021889.doc
but when I look at the variable what I see is:...
|
by: Keith Wilby |
last post by:
I have a personnel database with a hyperlink field which contains the path
to a mugshot. I was thinking of combining the hyperlink field with the
surname field by putting the surname in the "Display Text" of the hyperlink.
I have 200 or so existing records - can this be done either with code or in
a query? I'm not sure of the syntax to use...
|
by: tshad |
last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the
problem.
Apparently, it doesn't figure out the path correctly. It uses the path of
the file it is in, even if it is a control.
I have 2 files "displayCompanyJobs.aspx" and "displayCompanyOverview.aspx"
which are in both the folder "/jobseeker/" and "/employer/"....
|
by: oconndav |
last post by:
Hi,
I'm a newbie to web design, and have been piecing togther a site for a friend over the last few weeks basically by Googling everything I don't understand and trying to fit it all together. It's been an uplifting experince and have picked up some knowledge of MySQL, PHP, XML and AJAX along the way.
I nearly have all of the functionality...
| |
by: mramsay |
last post by:
Hi there,
I have a dynamic hyperlink Baseball. When the user select the hyperlink they are redirected to another page.
After that I want to display information on the page from my linkstbl.
The information I want to display is Baseball and some text I have entered in the database. I'm having a problem displaying the two fields for...
|
by: mdock |
last post by:
Hello,
I have a javascript grid on my ASP page which displays information about the history of specific units produced in our manufacturing facility. One of the results is the order number on which the unit was shipped. If the unit was not shipped, obviously there is no order number; the default value of this field on the data table is 0.
...
|
by: webster5u |
last post by:
Hi, I'm encounter a problem here. I hope somebody able helping me.
i'm put a "log out" hyperlink overlap a image and that particular image is inside a table cell. I also try align the hyperlink on bottom and right at the cell but the problem is occur.
If i set position as absolute then the image and hyperlink will leak out from table. If...
|
by: sivasrec |
last post by:
Hi,
This is sivakumar from India. Now I am learning to ASP.NET 2.0..
I have a doubt....
I have used in a one hidden field control, 2 label controls, 2 button controls and one hyperlink controls.
<asp:Label ID="Label1" runat="server"
style="z-index: 1; left: 77px; top: 280px; position: absolute; height: 24px"
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |