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

Form wont 're-open' if opened from macro using menubar

P: n/a
Hi,

I have a custom menubar which lets users jump to useful forms in my
database.
For example if I first open a form called 'Add Individual' then another
called 'Add Firm', if i try opening 'Add Individual' again nothing
happens. (All form openings were from the menubar)

I assume this is because the form is already open and so cant open
another copy of it. As the menubar lets users follow a different
navigation from the normal flow how would i make it so that if the form
was already open just set the form focus, otherwise open the form.

I cant see how to do this with macros though. I also cant see how to
assign sub routines to the menubar commands rather than a macro.

Aug 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If the form is already open, you want to SetFocus to it.
In code, that's:
Forms("MyForm").SetFocus

Your macro can use RunCode to pass control to a function.

You may be able to put the =MyFunction() directly into the action, though
this had some bad side effects in some versions.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<ol*************@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hi,

I have a custom menubar which lets users jump to useful forms in my
database.
For example if I first open a form called 'Add Individual' then another
called 'Add Firm', if i try opening 'Add Individual' again nothing
happens. (All form openings were from the menubar)

I assume this is because the form is already open and so cant open
another copy of it. As the menubar lets users follow a different
navigation from the normal flow how would i make it so that if the form
was already open just set the form focus, otherwise open the form.

I cant see how to do this with macros though. I also cant see how to
assign sub routines to the menubar commands rather than a macro.

Aug 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.