Hyperlinks

M

Matt

Hello,


I have created a button on a form to create a folder relating to the specfic
record which works fine. What I want to do is use some code to store the
address of the folder in the hyperlink field. However I am not having much
success. Heres the code

Dim MyFolder, MyPath, MyHyper

MyFolder = Me![txtRef] & "_" & Me![txtCustomerName]
MyPath = "\\Server\\LossFiles"
MkDir MyPath & "\" & MyFolder
"It works to here creating the folder"
MyHyper = MyPath & "\" & MyFolder
Me.hypField = HyperlinkPart(MyFolder, acDisplayText)
Me.hypField = HyperlinkPart(MyHyper, acAddress)

Thanks in advance


Matt
 
A

Alex Dybenko

Try:

Me.hypField = HyperlinkPart(MyFolder, acDisplayText) & "#" &
HyperlinkPart(MyHyper, acAddress)
 
M

Matt

Thanks for your help Alex

However still not solved the problem the display text appears in the
hyperlink field however the address part is missing. Any more ideas????

Thanks in advance

Matt

Alex Dybenko said:
Try:

Me.hypField = HyperlinkPart(MyFolder, acDisplayText) & "#" &
HyperlinkPart(MyHyper, acAddress)

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Matt said:
Hello,


I have created a button on a form to create a folder relating to the
specfic
record which works fine. What I want to do is use some code to store the
address of the folder in the hyperlink field. However I am not having much
success. Heres the code

Dim MyFolder, MyPath, MyHyper

MyFolder = Me![txtRef] & "_" & Me![txtCustomerName]
MyPath = "\\Server\\LossFiles"
MkDir MyPath & "\" & MyFolder
"It works to here creating the folder"
MyHyper = MyPath & "\" & MyFolder
Me.hypField = HyperlinkPart(MyFolder, acDisplayText)
Me.hypField = HyperlinkPart(MyHyper, acAddress)

Thanks in advance


Matt
 
A

Alex Dybenko

Then try:
Me.hypField = HyperlinkPart(MyFolder, acDisplayText) & " " &
HyperlinkPart(MyHyper, acAddress) & "#" & HyperlinkPart(MyHyper, acAddress)

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Matt said:
Thanks for your help Alex

However still not solved the problem the display text appears in the
hyperlink field however the address part is missing. Any more ideas????

Thanks in advance

Matt

Alex Dybenko said:
Try:

Me.hypField = HyperlinkPart(MyFolder, acDisplayText) & "#" &
HyperlinkPart(MyHyper, acAddress)

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Matt said:
Hello,


I have created a button on a form to create a folder relating to the
specfic
record which works fine. What I want to do is use some code to store
the
address of the folder in the hyperlink field. However I am not having
much
success. Heres the code

Dim MyFolder, MyPath, MyHyper

MyFolder = Me![txtRef] & "_" & Me![txtCustomerName]
MyPath = "\\Server\\LossFiles"
MkDir MyPath & "\" & MyFolder
"It works to here creating the folder"
MyHyper = MyPath & "\" & MyFolder
Me.hypField = HyperlinkPart(MyFolder, acDisplayText)
Me.hypField = HyperlinkPart(MyHyper, acAddress)

Thanks in advance


Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Getting hyperlink field to work 0
Hyperlinks 0
Moving Folders 1
Checking if a word doc exists 4
Insert OLE object 1
hyperlink fields 1
Hyperlinks 0
problem when load image files to database.. 5

Top