PC Review


Reply
Thread Tools Rate Thread

How can I assign the Hyperlink Address property value using VBA c.

 
 
=?Utf-8?B?d2F0ZXJtYW4=?=
Guest
Posts: n/a
 
      3rd Mar 2005
I am creating a simple HR application and need to assign a value to the
hyperlink address property of a command button using VBA code so that I can
give the user a link to a job description in Word. I can set the value but
when I click the button it gives a message that the file cannot be found;
however, it is where it is supposed to be. I have paused the code to see
what the hyperlink value is beig set to and it is the correct address but it
displays with the # symbol at each end. I think the # symbols are causing
the problem. How do I get rid of them.

Thanks for the help
 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      3rd Mar 2005
Waterman

Don't get rid of them. Take a look at Access HELP on the hyperlink data
type -- those "#"s demarcate the (?3, ?4) separate components of the
hyperlink address.

--
Good luck

Jeff Boyce
<Access MVP>

"waterman" <(E-Mail Removed)> wrote in message
news:AD098A0F-A02B-4FE3-B6B3-(E-Mail Removed)...
> I am creating a simple HR application and need to assign a value to the
> hyperlink address property of a command button using VBA code so that I

can
> give the user a link to a job description in Word. I can set the value

but
> when I click the button it gives a message that the file cannot be found;
> however, it is where it is supposed to be. I have paused the code to see
> what the hyperlink value is beig set to and it is the correct address but

it
> displays with the # symbol at each end. I think the # symbols are causing
> the problem. How do I get rid of them.
>
> Thanks for the help


 
Reply With Quote
 
Marsela
Guest
Posts: n/a
 
      15th Mar 2005
Hi Waterman:
I have a solution.
My user has to open and Insurance Application form from an
Access form, i didn't use Hyperlink as didn't work with a
button so I have a option group where one of them is:
Insurance Application Form, and a button Named "Open"

In Module i have created a public function for opening
Word Documents:

Public Function OpenWordFile(pstrpath As String)

Dim pobjWord As Word.Document

Set pobjWord = GetObject(pstrpath)
pobjWord.Application.Visible = True

Set pobjWord = Nothing

End Function

and I call this function under the option as below (on
command button click-Event)

.......
dim pstrpath as string
.....
Case 6
'Opens Insurance application form
pstrpath = "G:\Database\ExhIns_2.doc"
Call OpenWordFile(pstrpath)
......

It works fine for me until now. IF somebody has anyother
solution would be great.

Thanks,
Marsela

>-----Original Message-----
>I am creating a simple HR application and need to assign

a value to the
>hyperlink address property of a command button using VBA

code so that I can
>give the user a link to a job description in Word. I can

set the value but
>when I click the button it gives a message that the file

cannot be found;
>however, it is where it is supposed to be. I have paused

the code to see
>what the hyperlink value is beig set to and it is the

correct address but it
>displays with the # symbol at each end. I think the #

symbols are causing
>the problem. How do I get rid of them.
>
>Thanks for the help
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading a hyperlink from a table and inserting it into the hyperlink property... MaxGay Microsoft Access Form Coding 2 16th Oct 2007 09:22 PM
Hyperlink address property KimTong via AccessMonster.com Microsoft Access Forms 7 24th Jul 2007 06:42 PM
Assign property from db to object property? Burt Microsoft VB .NET 2 7th Feb 2006 10:33 PM
Cannot assign property of a WebControl Frédéric Mayot Microsoft ASP .NET 2 8th Aug 2004 10:25 PM
Assign Property To ErrorProvider Derek Hart Microsoft Dot NET Framework Forms 0 11th Jul 2003 02:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:53 PM.