The previous developer basically took the metrics from the last row in Excel and used SQL to identify what should be
- date
- metric ref #
- value
in the Access table
Is there something I can do where I can grab that newly created record created by using SQL and then say
MSQL = _
- date
- metric ref #
- value
in the Access table
Is there something I can do where I can grab that newly created record created by using SQL and then say
Code:
Dim ExcelRecord as String
Dim AccessRecord as String
If ExcelRecord = NEWLY CREATED Access Record from using sql Then
bfound = True
Else
bfound = False
End If
MSQL = _
Code:
" SELECT Metrics.Metric, Reporting_H.Level_1, Metrics_X_Reporting_H.Metric_ID, Info_Weekly.Date, " _
& "Info_Weekly.Value " & _
"FROM ((Metrics_X_Reporting_H INNER JOIN Metrics ON Metrics_X_Reporting_H.Metric_Name_ID = Metrics.Metric_Name_ID) " _
& _
"INNER JOIN Reporting_H ON Metrics_X_Reporting_H.H_ID = Reporting_H.H_ID) " _
& _
"INNER JOIN Info_Weekly ON Metrics_X_Reporting_H.Metric_ID = Info_weekly.Metric_ID " _
& "WHERE (((Metrics.Metric)='" & "Force Completed On Time - Weekly" & "') " & _
"AND ((Reporting_H.Level_1)='" & "ELT" & "') " & _
"AND ((Info_weekly.Date)='" & MDate & "'));"