Private Sub Buildfile()
Dim db As Database
Dim rs As Recordset
Dim rs2 As Recordset
Dim TimeValue As Integer
Set db = CurrentDb
Set rs = db.OpenRecordset("auxil1", dbOpenDynaset)
Set rs2 = db.OpenRecordset("auxil_logic_open", dbOpenDynaset)
Do While Not rs.EOF
'Debug.Print rs![Number], rs2![Number]
If (rs!Number) = (rs2!Number) Then
If (rs!Trans_Number) < 7 and Then
If (rs!tx_Date) = (rs2!tx_Date) Then
Debug.Print rs!Number
End If
Else
rs.Delete
End If
rs.MoveNext
Loop
rs.Close
rs2.Close
I am trying to compare two tables and pick some information in it depending on the condition. I am having a tough time figuring this out. I need module to compare line by line and pick the line record and write it to another table.
thank
erwin