|
-
Jul 10th, 2007, 01:03 PM
#1
Thread Starter
New Member
Create linked table
Hi! I'm trying to create a linked table in MS Access, and that table must be linked to a simple SQL Query (e.g. "SELECT * FROM Employees WHERE Employee = 'John'".
Any ideas? Thanks!
-
Jul 10th, 2007, 08:07 PM
#2
Re: Create linked table
Are you doing this in Access VBA or VB 6?
Usually a linked table links to another Table in another databaase.
Sounds like you just want to create a Query.
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 
-
Jul 10th, 2007, 08:19 PM
#3
-
Jul 10th, 2007, 08:23 PM
#4
Re: Create linked table
Yes and no. In Access its called a Query but in SQL Server and other more rhobust DB systems its called a View.
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 
-
Jul 12th, 2007, 10:19 AM
#5
Thread Starter
New Member
Re: Create linked table
I'm doing it on VB6, you're right, I want to create a query like the example I posted earlier
-
Jul 12th, 2007, 05:30 PM
#6
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 13th, 2007, 09:48 AM
#7
Thread Starter
New Member
Re: Create linked table
Thanks for the ADO tutorial, but I already know how to connect and add/update/delete recordsets, I need to know how can I make a table that comes from a SQL Query. Thanks
-
Jul 13th, 2007, 09:56 AM
#8
Re: Create linked table
Are you tring to perform a create table based on a select statement?
Create table Test as (Select * From Personnel Where 1 = 2)
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Jul 13th, 2007, 02:46 PM
#9
Re: Create linked table
It would be ...
oCnn.Execute "CREATE VIEW qryTest AS SELECT * FROM Table1;"
Where oCnn is your ADO Connection Object
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
|