|
-
Nov 14th, 2007, 04:39 AM
#1
Thread Starter
Member
sharing Access forms
I built a form containing several functions; I need to start this form from several different databases; can I do this without copying it to all databases, which would raise maintenance problems?
-
Nov 14th, 2007, 04:41 AM
#2
Re: sharing Access forms
AFAIK, no. You could only have one database form open another database form in a separate instance of Access.
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 
-
Nov 14th, 2007, 08:01 AM
#3
Thread Starter
Member
Re: sharing Access forms
Looks like I found some kind of "hack" to accomplish this task:
- I declare a public function in the DB library.mdb, which contain the forms;
- the function, named LaunchForm(), contains statement Application.DoCmd.OpenForm ("frmMain");
- I connect a second database main.mdb to library.mdb, as a "reference" (Menu Tools->References from source window);
- I create a form in main.mdb, containing a button which launches LaunchForm(), which appears visible also in main.mdb, and magically form appears!
-
Nov 14th, 2007, 08:03 AM
#4
Re: sharing Access forms
Oh cool trick. Thanks for the update. 
Guess you would need a unique form name as if you had frmMain in both but they were different forms you may create a conflict have to fuly qualify the form when calling.
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 
-
Nov 14th, 2007, 08:37 AM
#5
Thread Starter
Member
Re: sharing Access forms
 Originally Posted by RobDog888
Oh cool trick. Thanks for the update. 
Guess you would need a unique form name as if you had frmMain in both but they were different forms you may create a conflict have to fuly qualify the form when calling.
Good point.
I just tried saving a form in a db using same name of a form in the other db, but Access does not allow it.
I guess similar check is performed when connecting a database as a reference.
-
Nov 14th, 2007, 05:44 PM
#6
Re: sharing Access forms
Cool, at least MS was proactive on this when you add a db reference.
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
|