Hyperlinks and Forms

A

Allison

Access 2003
XP SP 2

I have a form used to collect and edit information about our vendors. One
field on the underlying query/table is a Web site field, formatted as a
hyperlink so it can be used in related reports.

Problem with the form is - if there is info existing in that hyperlinked
field, clicking the filed activates the Web site. We only want to update the
data, not visit the Web site.

What's the best solution for allowing direct editing of the hyperlink field
without activating the link, but keeping the hyperlink functionality in
related reports?
 
D

Dennis

I'm probably off-base here, but I'd keep the field as a straight text-box
control in the database, but in reports I'd create an unbound hyperlink-type
field and move the value from the database into it at report-time.
 
A

Allison

Thank you Dennis. I'm lost, however. I think this is beyond my current
ability, because I don't understand how to do that without having to create
each link individually:

"create an unbound hyperlink-type field and move the value from the database
into it at report-time"

Thank you for taking the time to reply.

Allison
 
D

Dennis

Just create the unbound field in the Detail section of the report. Then, in
the OnFormat event of the detail section, insert code like:

Me.MyUnboundField = Me.MyDatabaseField

(where the names are what you need/want them to be). Since the field
"MyUnboundField" has a type of Hyperlink (you set that when you create the
field on the detail for the report), the conversion should be automatic.
 
R

Ron2006

In addition:

If you have a form that is displaying that field that contains the
address you can put the following code in the double-click event to
enable the user to go to the site. You could maybe also format the
field as blue and underlined so they think of doing the double click
or explain it somewhere on the form.

application.followhyperlink me.fieldname

Ron
 

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