General discussion

Locked

Access97 - VBA question on RunCommand

By mrmolio ·
I'm trying to create a button on a form that will basically duplicate the
Insert/Hyperlink menu command and let the user browse for a file path, but
I would like the "use relative path for hyperlink" check box to be
cleared, since the users often forget to do that, and it seems to be
checked by default.

The code I have so far works fine, but is there an argument or parameter
that will let me specify that I want the check box cleared? Here is what I
have so far:
Me!Shortcut.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink

("Shortcut" is the name of the field that will hold the hyperlink.)

Thanks for your help!
Craig

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access97 - VBA question on RunCommand

by mark.thomson In reply to Access97 - VBA question o ...

DoCmd.RunCommand only takes 1 parameter unfortunately. Reading between the lines of the Access Help file (and after some experimentation), the "use relative path for hyperlink" checkbox when checked seems to mean "do not enforce absolute paths" rather than "enforce relative paths" so you can allow your users to ignore the checkbox and then use some validation code to check the format of the hyperlink, getting the user to re-enter hyperlinks that do not fit your application's requirements.

Collapse -

Access97 - VBA question on RunCommand

by mrmolio In reply to Access97 - VBA question o ...

Poster rated this answer

Collapse -

Access97 - VBA question on RunCommand

by mrmolio In reply to Access97 - VBA question o ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums