473,796 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HIDE / SHOW OF FORMS in MS Access

25 New Member
HI!!

If I have 2 forms ie form 1 , form 2

In Form 1 I have a command button to open form 2.

how will i hide form 1 and show form 2, until i click on close button it open form 1 and form 2 should hide. in ms access

how do i work on it on ms access?

Thanks & bye

Kartik
Apr 14 '07 #1
3 121221
garethfx
49 New Member
Quick and cheap - Id use a simple macroso that the form 1 buttom runs the marco name (for instance) open_form2 where macro uses OpenForm (form2) -Close (object form1),


Then reverse the process in form 2


Gareth
Apr 14 '07 #2
ADezii
8,834 Recognized Expert Expert
HI!!

If I have 2 forms ie form 1 , form 2

In Form 1 I have a command button to open form 2.

how will i hide form 1 and show form 2, until i click on close button it open form 1 and form 2 should hide. in ms access

how do i work on it on ms access?

Thanks & bye

Kartik
'To Open Form2 and Hide Form1
Expand|Select|Wrap|Line Numbers
  1. Me.Visible = False
  2. DoCmd.OpenForm "Form2", acNormal, , , acFormEdit, acWindowNormal
'To make Form1 visible again after Form2 is closed
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Close()
  2.   Forms![frmTest].Visible = True
  3. End Sub
Apr 14 '07 #3
NeoPa
32,579 Recognized Expert Moderator MVP
Essentially, if switching between forms as in the original request, the original code would open both forms and could also have a procedure which could be called from anywhere which switched between one being visible and the other.

How this is triggered isn't specified so can be as flexible as you like but the code would be something like :
Expand|Select|Wrap|Line Numbers
  1. Public Sub SwitchForms()
  2.     With Forms("Form 1")
  3.         .Visible = Not .Visible
  4.     End With
  5.     With Forms("Form 2")
  6.         .Visible = Not .Visible
  7.     End With
  8. End Sub
Oct 23 '21 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
883
by: Robb Gilmore | last post by:
Hello, This is probably an easy one, but I have not been able to figure it out so far. I have a tab control on a windows forms app. Depending on some business logic, I need to hide/show some of the individual tabs. The tab page has no "visible" property. The tabpage class has a "hide" method, but this does not seem to make it disappear. I have been able to remove them via something like this:
4
8012
by: jerryyang_la1 | last post by:
I've found this script that allows be to hide/show form elements.. <script language="JavaScript"><!-- var toggle = true; function show(object) { if (document.layers && document.layers) document.layers.visibility = 'visible'; else if (document.all) { document.all.style.visibility = 'visible';
1
1472
by: Norman | last post by:
Hello All, I have developed the ASP.Net application using .Net 1.1. I want to get one section of the page under hide/show feauture. That means when the user clicks on display I want to display all the controls and data in that section. when the user cliks on hide I want to hide that section so that the screen will be very short to navaigate vertically. All my users uses ie5.+. Thnaks, Norman
1
2536
by: jef | last post by:
I have an HTML Grid Layout Panel on my web form that I would like to hide/show via certain events in my VB code behind. However, I'm not sure how to reference the panel. I've set the ID property of the panel but when I reference it in my VB code, it just says the object doesn't exist. -jef
2
2582
by: Greg | last post by:
Hello, I am trying to display order ids and order details (order items). I would like to give the user Hide/Show option to either display or hide order details. The page would look like: Expand All Collapse All
1
1524
by: roni | last post by:
hi. i have webform with 4 panel that i switch then in wizard style ( asp 1.1) . i want to know if i can hide/show the asp panel control IN THE CLIENT SIDE ? meaning, show panel 1 . user enter data. switch to panel 2 IN CLIENT SIDE ....till panel 4
6
16319
elamberdor
by: elamberdor | last post by:
Hi All! Trying to get a drop down hide/show div on a html page triggered by a button in flash. (Intro: Very very Little experience in dynamic flash) setup: html page, flash map on page, button on flash opens info underneath map in a separate div. div that has hide/show content is called "operator" I found this code, but i'm not sure it's what I need, and it's not working... Flash file>button on stage>script:
15
3809
by: worked | last post by:
I have a script that hides / shows form elements, and wrapped in a tab script (tab navigation). When the code is duplicated (per tab content), the hide / show function works for the first tab but breaks in each subsequent tab. Why? Help appreciated! Example: http://geocities.com/edmurphy21/ hide / show script: <script type="text/javascript"> function showHide() { var idx = this.id.split('-'); var sp =...
11
3727
by: dmorand | last post by:
I'm having some trouble with my javascript which is supposed to hide/show a div element. I have to click on the link twice before it'll hide. I can't seem to figure out why the first click does nothing. function hideshow(which){ if (!document.getElementById) return if (which.style.display=="block") which.style.display="none" else which.style.display="block"
0
9680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10455
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10173
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10006
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6788
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.