473,395 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Make Form Button close current form and bring switchboard to foreground

Hi,

Can anyone recommend a piece of VBA code I could attach to a button in
a MS Form form that will close the current form and bring the
switchboard to foreground. I'm trying to integrate a form of buttons
into the way the switchboard gets used.

Best wishes,

George Hadley
gh********@yahoo.com

Mar 13 '06 #1
4 9547
<gh********@yahoo.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
Hi,

Can anyone recommend a piece of VBA code I could attach to a button in
a MS Form form that will close the current form and bring the
switchboard to foreground. I'm trying to integrate a form of buttons
into the way the switchboard gets used.

Best wishes,

George Hadley
gh********@yahoo.com


George,

You don't really need a "close form" button. Hide your switchboard form
when your
target form opens and unhide it when it closes. In the target form's open
event:

Forms("frmSwitchboard").Visible = False

In the form's close event:

Forms("frmSwitchboard").Visible = True

It's a bit clunky in that it will cause an error if the switchboard form
isn't loaded but it should work otherwise.

Keith.
www.keithwilby.com
Mar 13 '06 #2
Form_frmSwitchboard.Visible = False/True
should avoid the error and open the form if it is not loaded (and not
open it if it is).
This assumes frmSwitchboard's HasModule Property is True. I assume it
will be True for a Switchboard.

Mar 13 '06 #3
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
Form_frmSwitchboard.Visible = False/True
should avoid the error and open the form if it is not loaded (and not
open it if it is).
This assumes frmSwitchboard's HasModule Property is True. I assume it
will be True for a Switchboard.


Didn't realise that Lyle, thanks for the info.

Keith.
Mar 13 '06 #4
gh********@yahoo.com wrote:
Hi,

Can anyone recommend a piece of VBA code I could attach to a button in
a MS Form form that will close the current form and bring the
switchboard to foreground. I'm trying to integrate a form of buttons
into the way the switchboard gets used.

Best wishes,

George Hadley
gh********@yahoo.com


To close the current form you can enter something like
Docmd.Close acForm,Me.Name
and to select the Switchboard
Docmd.SelectObject acForm,"SwitchboardFormName"

Mar 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Eric Osman | last post by:
Hi, When I run the following html file on netscape, and the button is clicked, the new window pops BEHIND all my other windows. How can I easily fix this html file so the window comes up in...
13
by: Martin Dennett | last post by:
Hi I'm new to this group so go easy on me! I currently use a database that has had one constant niggle for a while and I was wondering if anybody can help sort it out. From an opening screen...
2
by: Lumpierbritches | last post by:
Thank you in advance for your assistance. I would like to know if there's a way to detect if NO form is open, so the Switchboard is opened and not leaving a user with no interface in the...
8
by: Emily Jones | last post by:
Very strange one this. Application written in Access 2000. Runs in 2003 at client's site, 2000 on my development system. FE/BE system. The app's startup form sets a few options, opens the...
4
by: zack | last post by:
Any help with this would be greatly appreciated, as cannot work out how to resolve. I have a report called "3_Strikes". In its 'On open' event is command to also open a criteria form popup form...
9
by: mtgrizzly52 | last post by:
Hi all, I've looked for an answer for this in lots of books, online in several discussion groups and have not found the answer which I feel may be very simple. What I want to do is have a...
1
by: Lumpy | last post by:
Hi all, I have have been lucky to get some good advice in regards to some access questions I have had so far. The good news is I am almost done with this project but I seem to have hit another...
11
by: andrewdb | last post by:
I have been working with a database that was already created by somebody else, who now no longer works here, so I cant ask any questions. None the less, there is a table 'Ascertainment' which...
11
by: Simon van Beek | last post by:
Dear reader, By opening an application I get always the main Access window with the closing cross in the above right corner. Is there a possibility to make this closing cross invisible? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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...

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.