June7, this is what I have so far. Could you please advise on the Inner Join query? I have never really understood the SQL stuff very well.
Note: F14 is the same column for "CatalogNumber" in the excel file. When I link the excel file to the database, that's the name of the field it is given.
Thanks!
Code:
Public Sub Match()
Dim File_name As String
Dim Path As String
File_name = "IT_Production " & Format(Now(), "mm") & Format(Now(), "dd")
Path = "S:\IT Production Meeting\IT_Production " & Format(Now(), "mm") & Format(Now(), "dd") & ".xlsx"
'Links dynamically changing excel file name to Access
DoCmd.TransferSpreadsheet acLink, , File_name, Path
'Query
"SELECT tblOverstock.CatalogNumber" & _
From tblOverstock & _
INNER JOIN File_Name _
ON tblOverstock.CatalogNumber = File_name.F14