Below is the code I want to put this in right after the docmd transfertext line. I'm getting bits of code here and there and don't really know VB. I tired just copying it there but it didn't work.
Can you help?
The code is below (I am importing into a temporary table, I the run a couple find unmatched append queries and then want to select all of the records
Private Const mcsFileFilter As String = _
"Excel Files (*.xls)|*.xls|" & _
Private Sub cmdCommonDialog_DE_Click()
txtImportFile_DE = CommonDialogClickGs(Me, mcsFileFilter)
Private Sub cmdImport_Click()
On Error GoTo Proc_Err
Dim sStatusBarContents As String
' ---- Convert the excel files to CSV files and Import ----
' ---- Copy records into HMDA master table eliminates duplicates due to the primary key ----
DoCmd.TransferText acImportDelim, "Lab Data Import Specifications", "tbl_temp", txtImportFile_DE, True
DoCmd.OpenQuery ("temp without matching records in results qry")
DoCmd.OpenQuery ("temp without matching records in samples qry")