Hello,
Thanks to y'all I had this great code yesterday
Now before the deletion of that temporary table I need calculations to be done. I did not find how to pose this problem a little complex, so I made a small diagram :
I really hope you'll understand what I want to achieve. If not I will try to give more details.
Thanks to y'all I had this great code yesterday
Code:
Private Sub ImportXls_Click()
Dim Filepath As String
Dim strTable As String
Dim MainTable As String
Dim strSql as String
Dim base As DAO.database
Filepath = Me.fpath.Value
MainTable = "Operation"
strTable= "TemporJ"
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, strTable, Filepath, True
Set base = CurrentDb
strSql = "INSERT INTO MainTable SELECT * FROM " & strTable & " WHERE id_Stock IS NOT NULL"
base.Execute strSql, dbFailOnError
base.Close
Set base = Nothing
DoCmd.DeleteObject acTable, strSheet
MsgBox "Data have been imported.", vbInformation,
End Sub
Now before the deletion of that temporary table I need calculations to be done. I did not find how to pose this problem a little complex, so I made a small diagram :
I really hope you'll understand what I want to achieve. If not I will try to give more details.