hyperlinkpart and dlookup problem

S

supersonix

Hi there,

I have a text box which has the following as the control source
=DLookUp("[Step]","qryStep")

This works just fine but the Step field in my table is set to
hyperlinks but no hyperlinks display in my text box. I tried using the
HyperlinkPart expression as such

=HyperlinkPart(DLookUp("[Step]","qryStep"), [acAddress])

but all I get is #Name? error in my text box. I'm fairly new to access
so my guess is that I'm not using the expression with the correct
syntax?

Any help would be appreciated.

Thanks,

Lalit
 
K

Ken Snell \(MVP\)

What do you want the textbox to display? The path that is the hyperlink? A
hyperlink? Something else?
 
S

supersonix

Hi,

Yes I want the textbox to display the hyperlink which is the "Step"
field in my table. The DLOOKUP displayed the hyperlink with #'s around
it but I want it to display the hyperlink without those if possible and
enable users to click on it.

Thanks,

Lalit

What do you want the textbox to display? The path that is the hyperlink? A
hyperlink? Something else?

--

Ken Snell
<MS ACCESS MVP>

supersonix said:
Hi there,

I have a text box which has the following as the control source
=DLookUp("[Step]","qryStep")

This works just fine but the Step field in my table is set to
hyperlinks but no hyperlinks display in my text box. I tried using the
HyperlinkPart expression as such

=HyperlinkPart(DLookUp("[Step]","qryStep"), [acAddress])

but all I get is #Name? error in my text box. I'm fairly new to access
so my guess is that I'm not using the expression with the correct
syntax?

Any help would be appreciated.

Thanks,

Lalit
 
K

Ken Snell \(MVP\)

Unless a textbox is bound to a field that is a hyperlink datatype, you
cannot make the text in the textbox act like a hyperlink (that is, allow
user to click on it as if it were a hyperlink) unless you write programming
based on some event (e.g., the Click event of the textbox).

If you use programming, you'd use something like this:

Private Sub TextBoxName_Click()
Application.FollowHyperlink Replace(Me.TextBoxName, "#", "", 1, -1,
vbTextCompare)
End Sub

--

Ken Snell
<MS ACCESS MVP>


supersonix said:
Hi,

Yes I want the textbox to display the hyperlink which is the "Step"
field in my table. The DLOOKUP displayed the hyperlink with #'s around
it but I want it to display the hyperlink without those if possible and
enable users to click on it.

Thanks,

Lalit

What do you want the textbox to display? The path that is the hyperlink?
A
hyperlink? Something else?

--

Ken Snell
<MS ACCESS MVP>

supersonix said:
Hi there,

I have a text box which has the following as the control source
=DLookUp("[Step]","qryStep")

This works just fine but the Step field in my table is set to
hyperlinks but no hyperlinks display in my text box. I tried using the
HyperlinkPart expression as such

=HyperlinkPart(DLookUp("[Step]","qryStep"), [acAddress])

but all I get is #Name? error in my text box. I'm fairly new to access
so my guess is that I'm not using the expression with the correct
syntax?

Any help would be appreciated.

Thanks,

Lalit
 
S

supersonix

That's the thing, the text box is bound to the "Step" field which is
set up as a hyperlink datatype. The DLOOKUP expression does pull that
field but the link shows up with ## around it and is not clickable for
the user. That is why I tried to add the HyperlinkPart expression
along with it but it didn't work.
Unless a textbox is bound to a field that is a hyperlink datatype, you
cannot make the text in the textbox act like a hyperlink (that is, allow
user to click on it as if it were a hyperlink) unless you write programming
based on some event (e.g., the Click event of the textbox).

If you use programming, you'd use something like this:

Private Sub TextBoxName_Click()
Application.FollowHyperlink Replace(Me.TextBoxName, "#", "", 1, -1,
vbTextCompare)
End Sub

--

Ken Snell
<MS ACCESS MVP>


supersonix said:
Hi,

Yes I want the textbox to display the hyperlink which is the "Step"
field in my table. The DLOOKUP displayed the hyperlink with #'s around
it but I want it to display the hyperlink without those if possible and
enable users to click on it.

Thanks,

Lalit

What do you want the textbox to display? The path that is the hyperlink?
A
hyperlink? Something else?

--

Ken Snell
<MS ACCESS MVP>

Hi there,

I have a text box which has the following as the control source
=DLookUp("[Step]","qryStep")

This works just fine but the Step field in my table is set to
hyperlinks but no hyperlinks display in my text box. I tried using the
HyperlinkPart expression as such

=HyperlinkPart(DLookUp("[Step]","qryStep"), [acAddress])

but all I get is #Name? error in my text box. I'm fairly new to access
so my guess is that I'm not using the expression with the correct
syntax?

Any help would be appreciated.

Thanks,

Lalit
 
K

Ken Snell \(MVP\)

Is the IsHyperlink property of the textbox set to Yes? Set it to Yes if not.
 
S

supersonix

I looked at all the property setting but couldn't find anything which
references that. Just so you know I'm using access 97.

Thanks for all of your help thus far.
 
K

Ken Snell \(MVP\)

Hmm... I don't have ACCESS 97 and haven't worked with it, so I cannot offer
additional suggestions.

I recommend that you repost your question and use this subject:
"Hyperlink in Textbox - ACCESS 97"
 

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


Top