This is the query, where FromDate and ToDate are fields on a search form.
SELECT Businesses.[Expiry Date], Businesses.[Business Name], Corporations.[Corporation Name], Corporations.LawyerID, Corporations.FirmID FROM Corporations INNER JOIN Businesses ON Corporations.[Corporation ID] = Businesses.[Corporation ID] WHERE (((Businesses.[Expiry Date]) Between [FromDate] And [ToDate]));
I get the error: You must have a SQL statement to use the DoCmd.RunSQL command... Hrmm... Odd, I used the query wizard to generate this... Any ideas?
SELECT Businesses.[Expiry Date], Businesses.[Business Name], Corporations.[Corporation Name], Corporations.LawyerID, Corporations.FirmID FROM Corporations INNER JOIN Businesses ON Corporations.[Corporation ID] = Businesses.[Corporation ID] WHERE (((Businesses.[Expiry Date]) Between [FromDate] And [ToDate]));
I get the error: You must have a SQL statement to use the DoCmd.RunSQL command... Hrmm... Odd, I used the query wizard to generate this... Any ideas?