By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,636 Members | 1,945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,636 IT Pros & Developers. It's quick & easy.

Trouble setting hyperlink string with code

P: n/a
If I type
www.microsoft.com
into the control txtSearchString which is bound to a hyperlink field, I
can click it and automatically zoom off to the web page.
But if I try to set the field with this snippet of code
Me.txtSearchString = "www.microsoft.com"
DoCmd.RunCommand acCmdSaveRecord
clicking on the field does nothing.

Well, not quite nothing. A tiny little square appears under the pointy
hand.

Any ideas?

pemigh

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I answered my own question. This works:
Me.txtSearchString = "www.microsoft.com#http://www.microsoft.com#"

Apparently Access does this concatenation when you type in the text,
but not when you set it with code. (I figure this out by using
SendKeys to mimic actually typing the text.)

pemigh


pemigh wrote:
If I type
www.microsoft.com
into the control txtSearchString which is bound to a hyperlink field, I
can click it and automatically zoom off to the web page.
But if I try to set the field with this snippet of code
Me.txtSearchString = "www.microsoft.com"
DoCmd.RunCommand acCmdSaveRecord
clicking on the field does nothing.

Well, not quite nothing. A tiny little square appears under the pointy
hand.

Any ideas?

pemigh


Nov 13 '05 #2

P: n/a
I answered my own question. This works:
Me.txtSearchString = "www.microsoft.com#http://www.microsoft.com#"

Apparently Access does this concatenation when you type in the text,
but not when you set it with code. (I figure this out by using
SendKeys to mimic actually typing the text.)

pemigh


pemigh wrote:
If I type
www.microsoft.com
into the control txtSearchString which is bound to a hyperlink field, I
can click it and automatically zoom off to the web page.
But if I try to set the field with this snippet of code
Me.txtSearchString = "www.microsoft.com"
DoCmd.RunCommand acCmdSaveRecord
clicking on the field does nothing.

Well, not quite nothing. A tiny little square appears under the pointy
hand.

Any ideas?

pemigh


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.