Download Dynamic Mass Marketing Processor
Transcript
Case "Equal To" SQLstring = SQLstring & " AND (svcgnhist.nmileage =" & [Doc_Mileage] & ")" Case "Less Than": SQLstring = SQLstring & " AND (svcgnhist.nmileage <=" & [Doc_Mileage] & ")" End Select End If '******************************************* '* Save the SQL statement in a table and '* the appropriate query '******************************************* [Doc_SQL] = SQLstring qdf.Sql = SQLstring ErrQuery: MsgBox Err.Description End Sub End Sub Function QueryExists(MyQueryName) Dim i Dim db2 As Database Set db2 = CurrentDb() QueryExists = False For i = 0 To db2.QueryDefs.Count - 1 If db2.QueryDefs(i).Name = MyQueryName Then 63