I have this code that selects which query to export and if records are found within the give date ranges it runs fine, but if no records are found in the first run it stops and dopes not contine to the second query to export?
Set rst = CurrentDb.OpenRecordset("Test Data")
If rst.RecordCount = 0 Then
Dialog.Box "No Records Found - Checking Next Test Data...", vbInformation, "Database Message"
Else
rst.MoveLast
rst.MoveFirst
Set rst = CurrentDb.OpenRecordset("Test2 Data")
If rst.RecordCount = 0 Then
Set rst = CurrentDb.OpenRecordset("Test Data")
If rst.RecordCount = 0 Then
Dialog.Box "No Records Found - Checking Next Test Data...", vbInformation, "Database Message"
Else
rst.MoveLast
rst.MoveFirst
Set rst = CurrentDb.OpenRecordset("Test2 Data")
If rst.RecordCount = 0 Then