Option Base 1 Sub Main Dim List_of_Dates() As String Dim List_of_Values() As String Dim List_of_Dates_1() As String Dim List_of_Dates_2() As String Dim List_of_Dates_3() As String Dim List_of_DatesOffice() As String Dim List_of_ValuesOffice() As String Dim TargetDb As Object Dim OfficeDb As Object Dim RecordsinSourceFile,RecordsinSourceFileOffice As Integer Dim ActiveDatabase, ActiveDatabaseOffice As String Dim MsgResult As String Dim vbCrLF As String vbCrLF = Chr(13) + Chr (10) '1ST DATABASE 'Set the database and recordset Set TargetDb =Client.Client.OpenDatabase("Account-Client Account.IMD") ActiveDatabase = Client.CurrentDatabase.Name 'MsgBox ActiveDatabase Set rs = TargetDb.RecordSet 'Get the number of records in the database 'rs.ToFirst 'rs.Next RecordsinSourceFile = rs.Count 'Resize Array of dates in first database ReDim List_of_Dates(RecordsinSourceFile) 'Define first element of the array of elements in dropdown list in second dialog box ReDim List_of_Values(RecordsinSourceFile) 'Resize Array of dates in Array that stores Dates = Dates +1 day ReDim List_of_Dates_1(RecordsinSourceFile) 'Resize Array of dates in Array that stores Dates = Dates +2 day ReDim List_of_Dates_2(RecordsinSourceFile) 'Resize Array of dates in Array that stores Dates = Dates +3 day ReDim List_of_Dates_3(RecordsinSourceFile) 'Get the Date and Value for each record in the database For i = 1 To (RecordsinSourceFile) rs.GetAt(i) Set CurrentRec = rs.ActiveRecord List_of_Dates(i) = CurrentRec.GetDATEValue("BOOKED_DATE") List_of_Values(i) = CurrentRec.GetNumValue("AMOUNT_IN_GBP") Msg = Msg & vbCrLF & List_of_Dates_1(i) &" " & List_of_Values(i) & vbCrLF & List_of_Dates_2(i) & " " & List_of_Values(i) & vbCrLF & List_of_Dates_3(i) & " " & List_of_Values(i) ' & vbCrLF & List_of_Dates_3(i) & " " & List_of_Values(i) 'Declare elements in 3 Arrays associated to increased dates (by 1 day each) List_of_Dates_1(i) = List_of_Dates(i)+1 List_of_Dates_2(i) = List_of_Dates(i)+2 List_of_Dates_3(i) = List_of_Dates(i)+3 Next i MsgBox Msg Stop '2ND DATABASE Set OfficeDb = Client.OpenDatabase("Account-Office Account.IMD") ActiveDatabaseOffice = Client.CurrentDatabase.Name 'MsgBox ActiveDatabase Set rsOffice = OfficeDb.RecordSet RecordsinSourceFileOffice = rs.Count 'Resize Array of Dates and Values in the second database ReDim List_of_DatesOffice(RecordsinSourceFileOffice) ReDim List_of_ValuesOffice(RecordsinSourceFileOffice) For i = 1 To RecordsinSourceFileOffice rsOffice.GetAt(i) Set CurrentRec = rsOffice.ActiveRecord List_of_DatesOffice(i) = CurrentRec.GetDATEValue("BOOKED_DATE") List_of_ValuesOffice(i) = CurrentRec.GetNumValue("AMOUNT_IN_GBP") Next i 'FINAL LOOP 'Compare if specific date and value from 1st database OR date + 1day and value OR date +2 days and value OR date + 3days and value find match in the second database ' For i = 1 To RecordsinSourceFile ' Value = List_of_Values(i) ' For Each Data_Rec In List_of_Dates ' For Each Data_Rec_Office In List_of_DatesOffice ' If Data_Rec = Data_Rec_Office and Value = CurrentRec.GetNumValue("AMOUNT_IN_GBP") or _ ' 'End If ' Next ' Next i End Sub