473,387 Members | 1,455 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,387 software developers and data experts.

HIDE / SHOW OF FORMS in MS Access

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 120448
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 Expert 8TB
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,556 Expert Mod 16PB
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
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...
4
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)...
1
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...
1
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...
2
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: ...
1
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...
6
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...
15
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...
11
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.