here is Table and Code! I have never run the code past line 9 (Set Rst4......)
thanks

Code:
Sub ViewOemData() ' selects design fan curve data and enters to spreadsheet
Set wsheet = appExcel.Worksheets(LocationName)
cnt3 = 0
'picks data for system curve
P1 = wsheet.Cells(25, 20) * 1000
Q1 = wsheet.Cells(15, 2)
Set wsheet = appExcel.Worksheets("Fan Data")
'enters data for system curve to spreadsheet
wsheet.Cells(8, 3 * NoCurves) = Q1
wsheet.Cells(9, 3 * NoCurves) = P1
'SQLDate = Format$(TestDte, "#\mm\/dd\/yyyy\#") ' TRYING TO FIX DATA TYPE MISMATCH
'finds fan at test location on test date by selecting all dates of moves preceding date of test and putting into ascending order
Set Rst4 = CurrentDb.OpenRecordset("SELECT PrimaryFanLocationsTbl.FanIndexID, PrimaryFanLocationsTbl.LocationID, PrimaryFanLocationsTbl.DateOfMove" & _
" FROM PrimaryFanLocationsTbl" & _
" WHERE PrimaryFanLocationsTbl.LocationID='" & LocID & "' AND PrimaryFanLocationsTbl.DateOfMove< #" & Format(TestDte, "mm/dd/yyyy") & "#;", dbOpenSnapshot)
With Rst4
.MoveFirst
FanIndexIDVar = .Fields(0)
PrecedingMoveDate = .Fields(2)
End With
' takes fan move date, finds preceding configuration date and selects configuration data
Set Rst10 = CurrentDb.OpenRecordset("SELECT FanConfigurationB4DateQry.FanIndexID, Last(FanConfigurationB4DateQry.ConfigurationDate) AS LastOfConfigurationDate" & _
"FROM ( SELECT FanConfigurationTbl.FanIndexID, FanConfigurationTbl.ConfigurationDate FROM FanConfigurationTbl WHERE (((FanConfigurationTbl.FanIndexID)= " & FanIndexIDVar & ") AND ((FanConfigurationTbl.ConfigurationDate)< " & PrecedingMoveDate & " ));)" & _
"GROUP BY FanConfigurationB4DateQry.FanIndexID;", dbOpenSnapshot)
With Rst10
wsheet.Cells(6, 3 * NoCurves - 1) = .Fields(1)
wsheet.Cells(41, 3 * NoCurves - 1) = .Fields(1)
wsheet.Cells(12, 3 * NoCurves - 1) = .Fields(0)
Do While Not .EOF
wsheet.Cells(44 + cnt3, 3 * NoCurves - 1) = .Fields(3)
wsheet.Cells(44 + cnt3, 3 * NoCurves - 1) = .Fields(4)
cnt3 = cnt3 + 1
.MoveNext
Loop
End With
Set Rst10 = Nothing
PrecedingMoveDate = ""
End Sub