Hyperlink help needed

  • Thread starter mattc66 via AccessMonster.com
  • Start date
M

mattc66 via AccessMonster.com

I have the below code on an after update event. The FileLocation displays the
proper file location. However the hyperlink doesn't work. The FileLocation is
a Hyperlink datatype.

Private Sub FileType_AfterUpdate()

Dim FilePath1 As String

FilePath1 = "W:\Materials\PartImageData\"
Me.FileLocation = FilePath1 & [ItemComponent] & [View] & [REVISION] & "." &
FileType


End Sub
 
M

mattc66 via AccessMonster.com

Need help with programing a hyperlink.
I have the below code on an after update event. The FileLocation displays the
proper file location. However the hyperlink doesn't work. The FileLocation is
a Hyperlink datatype.

Private Sub FileType_AfterUpdate()

Dim FilePath1 As String

FilePath1 = "W:\Materials\PartImageData\"
Me.FileLocation = FilePath1 & [ItemComponent] & [View] & [REVISION] & "." &
FileType

End Sub
 
D

DStegon via AccessMonster.com

I for one am not sure what you mean by this.
Need help with programing a hyperlink.
I have the below code on an after update event. The FileLocation displays the
proper file location. However the hyperlink doesn't work. The FileLocation is
[quoted text clipped - 9 lines]
 
M

mattc66 via AccessMonster.com

I am trying to use an after update event to build a hyperlink to a file in a
folder. The Name of the hyperlink appears when I perform the below event.
However the actual hyperlink doesn't work. I assume I am missing something to
actually generate the hyperlink.Private Sub FileType_AfterUpdate()

Dim FilePath1 As String

FilePath1 = "W:\Materials\PartImageData\"
Me.FileLocation = FilePath1 & [ItemComponent] & [View] & [REVISION] & "." &
FileType

End Sub
I for one am not sure what you mean by this.
Need help with programing a hyperlink.
[quoted text clipped - 3 lines]
 
D

DStegon via AccessMonster.com

So, the me.filelocation is a label i am assuming and you are filling it in
with the path or url to the choosen itemcomp, view, rev. Correct?

You have to set the hyperlinkaddress property of the label to get it to
launch
Me.FileLocation = FilePath1 & [ItemComponent] & [View] & [REVISION] & "." &
FileType
Me.FileLocation.HyperlinkAddress = "http://www.google.com/"
or
me.FileLocation.HyperlinkAddress =cstr(FilePath1 & [ItemComponent] & [View] &
[REVISION] & "." & filetype )

I am trying to use an after update event to build a hyperlink to a file in a
folder. The Name of the hyperlink appears when I perform the below event.
However the actual hyperlink doesn't work. I assume I am missing something to
actually generate the hyperlink.

Private Sub FileType_AfterUpdate()

Dim FilePath1 As String

FilePath1 = "W:\Materials\PartImageData\"
Me.FileLocation = FilePath1 & [ItemComponent] & [View] & [REVISION] & "." &
FileType

End Sub
I for one am not sure what you mean by this.
[quoted text clipped - 3 lines]
 
M

mattc66 via AccessMonster.com

FileLocation is a control and the type is set to Hyperlink in the table. When
I run the code as suggest below it gives me a run-time error '438': Object
doesn't support this property type. If I remove the .HylerlinkAddress from
the code it does what it was doing before. Building the Hyperlink name, but
not the actual Hyperlink address. If I set it manually it works just fine.
So, the me.filelocation is a label i am assuming and you are filling it in
with the path or url to the choosen itemcomp, view, rev. Correct?

You have to set the hyperlinkaddress property of the label to get it to
launch
Me.FileLocation = FilePath1 & [ItemComponent] & [View] & [REVISION] & "." &
FileType
Me.FileLocation.HyperlinkAddress = "http://www.google.com/"
or
me.FileLocation.HyperlinkAddress =cstr(FilePath1 & [ItemComponent] & [View] &
[REVISION] & "." & filetype )
I am trying to use an after update event to build a hyperlink to a file in a
folder. The Name of the hyperlink appears when I perform the below event.
[quoted text clipped - 16 lines]
 
M

mattc66 via AccessMonster.com

Correction: FileLocation is a TextBox
FileLocation is a control and the type is set to Hyperlink in the table. When
I run the code as suggest below it gives me a run-time error '438': Object
doesn't support this property type. If I remove the .HylerlinkAddress from
the code it does what it was doing before. Building the Hyperlink name, but
not the actual Hyperlink address. If I set it manually it works just fine.
So, the me.filelocation is a label i am assuming and you are filling it in
with the path or url to the choosen itemcomp, view, rev. Correct?
[quoted text clipped - 14 lines]
 
D

DStegon via AccessMonster.com

Make it a label. TextBox controls dont have a hyperlinkadress property that
is why you are getting the error. It MUST be a label.

Also, there is really no MAJOR reason to set the table field to hyperlink
unless you are going to use the specific things that is lets you do. Using a
text field for this case seems to be ample, but that is your choice.

Turn the textbox into a label and you will get the hyperlinkaddress property.

Correction: FileLocation is a TextBox
FileLocation is a control and the type is set to Hyperlink in the table. When
I run the code as suggest below it gives me a run-time error '438': Object
[quoted text clipped - 7 lines]
 
D

DStegon via AccessMonster.com

Oh.. BTW.... if you want the string (the file string) to be displayed then
you will ahve to put it in the CAPTION

me.label25.caption = FileString

Make it a label. TextBox controls dont have a hyperlinkadress property that
is why you are getting the error. It MUST be a label.

Also, there is really no MAJOR reason to set the table field to hyperlink
unless you are going to use the specific things that is lets you do. Using a
text field for this case seems to be ample, but that is your choice.

Turn the textbox into a label and you will get the hyperlinkaddress property.
Correction: FileLocation is a TextBox
[quoted text clipped - 3 lines]
 

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

Top