473,480 Members | 3,796 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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
1 1615
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3396
by: Krzysztof Karnicki | last post by:
I would like develop Form on my Windows Application, that is going to notify the user, just like Microsoft Office 2003 shows that there are new mail coming. When I use System.Windows.Forms.Form and...
5
15572
by: Al Sav | last post by:
I have the following in form load. When the form shows up, the graphics vanishes. This works, if I execute this from button_click. But, even that vanishes if minimize and restore the form. Similar...
2
1491
by: Mihailo | last post by:
I am new in VB.NET and at the bigining of my work I have a problem. I wont to make small program which contain 3 forms. In the 1st Form I put 10 Textbox which contents I need to display in the 3th...
10
2797
by: sandraz444 | last post by:
I have an expression in the query under my form to autofill the date under a certain condition but it wont write to the underlying table?? The date shows in the form but not the table. Does anyone...
3
1316
by: TS | last post by:
we publish our exceptions to email at work and include the form's vlaues to help debug in production. Since the control wont' appear if it is empty, how can i access it to show the controls wiht a...
8
1841
by: Mark12345 | last post by:
Hi folks, thanks for looking. I have a database that takes down order details. Each customer has there own priceid in the price table. the errors that I get say enter parameter value for:...
3
1166
by: =?Utf-8?B?aXdkdTE1?= | last post by:
Hi, im having a very weird problem. I can create a new project and set the form's background to an image i made in photoshop and run the program, no code written. the image is displayed as...
3
1744
by: mapster | last post by:
Greetings All, just started out leaning relational DB and access a few weeks ago, and seems that i need some pointers as i can not find any obvious answers (obvious to me). If any one can answer...
3
2404
by: ukfusion | last post by:
I have a php page with a form....the form has a hidden variable called subjoin. with a value of 1 in the page the data is posted to i have the following code <?...
4
2987
by: rb0135 | last post by:
Hi, I am writing a C# mobile 6 (dot.net 3.5) application. On the form, I have a label. I update this label with text as my initalizing routines are running (from the form load event), such as...
0
7041
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6736
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5331
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4478
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2994
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
561
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.