Pass focus back to form

B

BruceM

I have a database in which the users will need to insert links to files on
the network. There is a form/subform setup; the underlying tables are
related one-to-many. The hyperlinks are stored in the subform table.
I can put a command button on the subform to set the focus to the control
bound to the hyperlink field, then insert a hyperlink:
Me.txtLink.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink

However, it will be necessary to use Universal Naming Convention (I think
that's what it's called) to insert the full network path rather than using
the mapped drive letters. Therefore, I would like to have some instructions
appear that guide the user through drilling down through the network. Even
if UNC was not necessary I would want some sort of instructions, since the
Insert Hyperlink dialog box is not exactly intuitive.
My idea was to have an unbound form (frmInstructions) open from the command
button on the subform. The unbound form would contain step-by-step
instructions for inserting a hyperlink. The problem I seem to be having is
that once frmInstructions is open (it is neither pop-up or modal) I can't
pass the focus to the text box on the subform that is bound to the hyperlink
field. Without the focus in a hyperlink field, Insert Hyperlink does not
work.
I am open to suggestion as to either how I can make my approach work, or
another approach I could take. The only necessity is that the instructions
and the Insert Hyperlink dialog box need to be open at the same time.
Let me just say that while training the users and counting on them to always
remember the procedure would be good, it is not practical. For one thing,
some people will be using this database only occasionally. For another,
they would be very glad to just push this back at me unless it is clearly
spelled out for them and they have no excuse.
 

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