I have a query that compares two files and makes sure that the Customer ID in my temporary import file doesn't already exist in the Master file. If it finds a duplicate, it increments the customer number by one. Obviously, this query needs to be run until Access finds no more duplicates. How can I tell the following procedure to stop once it says "about to update 0 records"?
Code:
Sub CorrectPTdups()
Dim ReturnValue As Integer
' this variable means nothing '
Do
DoCmd.OpenQuery "IMPA8_correct_dup_customer_numbers"
Loop Until ReturnValue = 0
'loop until means nothing- hunting for the variable that will tell me how many records the query updated.'
End Sub