Ok, what I have is a linked excel document and a table in access I want to append the contents of the table to. From what I have read it would be easiest to use queries to do this. I am not very fluent in access so I am not sure if queries are the best thing to do. So far all I have code wise is this.
This code was taken from a previous version of the program they used a long time ago. The reason most of it is commented out is because those queries are from the older program and I have not created them, not really sure how. The ones that aren't commented out my predecessor had created. If that code looks good would I need to create all those queries or can it done through an easier method or will it need to be coded? Also, the table is called CURRENT and the linked table is called Employees. Thanks.
Code:
Private Sub new_employees_Click()
On Error GoTo Err_new_employees_Click
Dim qryTemp As QueryDef, tblTemp As TableDef, rstemp As Recordset, strSQL As String, RecCnt As Integer
DoCmd.SetWarnings False
DoCmd.OpenQuery "ADD new employees"
'DoCmd.OpenQuery "UpdateCURRENT"
'DoCmd.OpenQuery "CURRENT Without Matching TechID"
'DoCmd.OpenQuery "NewEmpTechID"
DoCmd.OpenQuery "Update preferred_name"
'DoCmd.OpenQuery "UpdateTechIDs"
'''Line below sends email'''
'SendMsg
DoCmd.SetWarnings True
MsgBox "Complete", vbOKOnly
Exit_new_employees_Click:
Exit Sub
Err_new_employees_Click:
MsgBox Err.Description
Resume Exit_new_employees_Click
End Sub