Any Access developers out there/ (I Need SQL help)

AlphaJohn

Honorary Master
Joined
Sep 10, 2012
Messages
20,099
Reaction score
15,882
Location
3rd planet from Sol
1st off I am not an expert and a little rusty in my code. I just need help with a simple problem adding a single feature to a clients Access aplication.

They have an internal Access aplication and want to be able to import data from Excel instead of coping the data manually everytine.

Database consist of
tblHead <-- form headder
tblData <-- subform

With One to many relation and link is an AutoID stored in the Subform

From ancent memory I know I have to import the data into a table and then transfer it to the subform. What I forgot is the SQL command to INSERT/APPEND the data into the subform

I can get the data into a table fine with

Code:
Private Sub Command7_Click()
DoCmd.DeleteObject acTable, "TempData"
DoCmd.TransferSpreadsheet acImport, , "TempData", "c:\test\test.xlsx", True
End Sub

All I need is to get TempData into the current Subform with the same AutoID link.

Any ideas cause either google or myself is useless? (I even went to page 2 on multiple search results with no luck)

Sample database and Excel file over here if it may help.
 
You reminded me how much I hate access programming. So glad I can use EF for data access instead.
 
Last time I touched Access was back in 2008, unfortunately when you do support you don't always have a choice :D

I have not touched Access since 2002; you are a braver man than I will ever be.
 
Top
Sign up to the MyBroadband newsletter
X