|
-
Feb 24th, 2006, 03:04 AM
#1
Thread Starter
Addicted Member
How to Open only one form at time in Access ??
hi all,
i have multiple form in access i am using access as a database and design form in access only so i have one main form which contain number of button (like a menu option's) from there i open one other form which also contain number of button for opening of the form i want to open one form at a time as follows ( following is no of button which open one form )
1) form main
Customer--
Other info--
Exit--
2) form Customer
Edit/Del Customer
Edit/ADD Customer
Return to Main form
3) from Other info
My Company info
Return to Main form
4) Exit button
when i am opening form main and click on "Customer button" it open form Customer and it remain form main also open is it posible that it open "form customer" in same windows ?? also when i am opening the Database at that time my "form main" should be open is it posible ?? how ??
pls help me regarding this ??
thanx in advance..
Nilesh Thakur. 
-
Feb 24th, 2006, 03:56 AM
#2
Re: How to Open only one form at time in Access ??
You can write the macro code to open and close the previous form. Then call it from the button click.
VB Code:
'Behind Main form:
Option Compare Database
Private Sub cmdCustome_Click()
DoCmd.OpenForm "Customer", acNormal, "", "", , acNormal 'Show desired form
DoCmd.Close acForm, "Menu" 'Close Main form
End Function
'Behind Customer Form:
Option Compare Database
Private Sub cmdBackNav_Click()
DoCmd.Close acForm, Me.Name 'Close current form
DoCmd.OpenForm "Main", acNormal 'Return to Main form
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 24th, 2006, 05:21 AM
#3
Thread Starter
Addicted Member
Re: How to Open only one form at time in Access ??
hi RobDog,
thanx again for giving answer for my question as you tell me i need to write one micro first i had try to write the micro but it show me one window with name Action i select the Runcode action so i can try the code over there and run my code from there but not able to do this ... pls tell me how to do this or directly write the code on button click event ???.....pls help me regarding this ..
and also tell me how to open my main page when database is open first time ...
thanx in advance
Nilesh Thakur. 
-
Feb 24th, 2006, 06:02 AM
#4
Re: How to Open only one form at time in Access ??
Tools > Database Utilities > Switchboard Manager... This is where you can specify a startup form for when the db is opened.
If you open your main form in design view and click on the cliss button you will be able to view the clode for the form. This is where you will place similar code to what I had posted.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 24th, 2006, 07:58 AM
#5
Thread Starter
Addicted Member
Re: How to Open only one form at time in Access ??
hay robDog,
is there any other way to set Default start page ??
because when i use Tools > Database Utilities > Switchboard Manager...
then it create one form Swithchboard and arrange all sequence of the form it's own ..
pls help me regarding this ...
if this one is only single way to craete it then can you pls tell me in detail way how to create Switchboard page or mane page...
thanx in advance..
Nilesh Thakur. 
-
Feb 24th, 2006, 01:15 PM
#6
Re: How to Open only one form at time in Access ??
Sorry, I meant Tools > Startup...
Its was very late last night
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|