Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Hideing a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chad - 14 Jun 2007 22:39 GMT
Hello, I have a button on my form (Maindb) thats named ReportsSwitchboard and
when clicked it brings up a form that is a paramater form. Is there some way
to hide the MaindB form when the ReportsSwitchboard is open and when the
ReportsSwitchboard is closed the MaindB form isnt hidden anymore.  Please
explaing because im new to Access... Thanks!
Regan - 14 Jun 2007 23:18 GMT
>Hello, I have a button on my form (Maindb) thats named ReportsSwitchboard and
>when clicked it brings up a form that is a paramater form. Is there some way
>to hide the MaindB form when the ReportsSwitchboard is open and when the
>ReportsSwitchboard is closed the MaindB form isnt hidden anymore.  Please
>explaing because im new to Access... Thanks!

in on click event put

Me.visible = false

On ReportsSwitchboard Close event put

Select Case SysCmd(acSysCmdGetObjectState, acForm, "Maindb")
       Case acObjStateOpen
           'Form is open but is not visible
           Forms!maindb.SetFocus
           Forms!Maindb.Visible = True
       Case 0
           'Form is closed, Do nothing
           Exit Sub
       Case Else
           'Form has been put into some mode not anticipated. Handle here
           MsgBox "Not anticipated", , "Not anticipated"
   End Select

Hope this helps

Signature

Regan,
Paeroa
World famous in New Zealand

Steve - 14 Jun 2007 23:28 GMT
Add the folowing code to the code in the Click event of your button:
Me.Visible = False

Put the following code in the Close event of ReportsSwitchboard:
Forms!MainDb.Visible = True

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com

> Hello, I have a button on my form (Maindb) thats named ReportsSwitchboard
> and
[quoted text clipped - 3 lines]
> ReportsSwitchboard is closed the MaindB form isnt hidden anymore.  Please
> explaing because im new to Access... Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.