|
-
Apr 26th, 2007, 10:17 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Import Access to Access from Excel
Is it possible to import a table from an Access' file to another one in Access, with a macro in Excel?
Last edited by Fonty; May 7th, 2007 at 06:37 PM.
-
Apr 26th, 2007, 06:30 PM
#2
Lively Member
Re: Import Access to Access from Excel
Hi mate,
Did a search for this, apparently using macros you can import data from an access table to a worksheet in excel and then export this worksheet to another access table.
http://www.exceltip.com/st/Import_da...Excel/427.html
http://www.erlandsendata.no/english/...badacexportado
Hope this helps.
-
Apr 26th, 2007, 07:07 PM
#3
Lively Member
Re: Import Access to Access from Excel
Please note excel before excel 2007 only contains 65,000 rows while excel 2007 contains 1,005,000 rows. Therefore you cannot copy a whole table from access to excel and then to access again. Do it row by row.
E.g. Open connection 1 to access table
get recordcount from table in access database for connection 1
do while not end of recordcount
read row for access table 1 for connection 1
save row to access table 2 for connection 1 (different recordsets)
end while
close connection 1
Hope this helps.
Last edited by marktheman; Apr 26th, 2007 at 07:13 PM.
Reason: Wrong info.
-
Apr 28th, 2007, 12:18 PM
#4
Re: Import Access to Access from Excel
Do the test to see if its 2003 or before and then just do like in my FAQ:
http://vbforums.com/showthread.php?t=402060
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 
-
Apr 30th, 2007, 06:26 PM
#5
Thread Starter
Addicted Member
Re: Import Access to Access from Excel
Isn't it just possible to 'call' the Export command in Access so that it export a Table into another Access file?
I see that I could do so in two steps with the examples of these threads. But as I manipulate a large amount of information it becomes quite slow.
-
Apr 30th, 2007, 06:28 PM
#6
Re: Import Access to Access from Excel
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 
-
Apr 30th, 2007, 07:23 PM
#7
Thread Starter
Addicted Member
Re: Import Access to Access from Excel
Thanks! The second method looks perfect.
Just one question left. These days I'm working a lot with databases and I feel quite lost. Is there a textbook on vba/ADO/DAO/Excel/Access you would suggest?
-
Apr 30th, 2007, 07:27 PM
#8
Re: Import Access to Access from Excel
I wish I could recommend something but I have learned mostly everything on my own. Additionally the Forums have been invaluable in gaining a broad range of real life issues to solve.
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 
-
May 1st, 2007, 03:40 AM
#9
Lively Member
Re: Import Access to Access from Excel
I have a good one for VB6 but it is very similiar to VBA. It's called the "Visual Basic 6, Black Book" by Steven Holzner and is excellent. You can also go into safari books, get 30 day trial and obtain a licence from them.
Cheers.
-
May 2nd, 2007, 08:25 AM
#10
Thread Starter
Addicted Member
Re: Import Access to Access from Excel
I was wondering, if it is possible to run a macro embeded in an Access file from a macro located in an Excel file.
-
May 4th, 2007, 09:41 PM
#11
Re: Import Access to Access from Excel
I dont think so unless you added a reference to the other and then opened the file.
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 
-
May 5th, 2007, 08:05 PM
#12
Thread Starter
Addicted Member
Re: Import Access to Access from Excel
-
May 6th, 2007, 04:13 AM
#13
Re: Import Access to Access from Excel
Not 100% sure as i havent really got into acutally using the Excel program where I am deep into coding it.
I believe there is code to reference a closed workbook's macro function(s) omewhere in the OD forum. Try a search.
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 
-
May 7th, 2007, 07:08 PM
#14
Thread Starter
Addicted Member
Re: [RESOLVED] Import Access to Access from Excel
Hi!
I found this theard:
http://vbforums.com/showthread.php?&...00#post1907700
It's just what I needed. Thanks for your advice. However, this macro calls a macro embeded in the Macro section of Access. The Macro I'd like to run lies in a Module. How can I call a Macro from some Module?
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
|