Running SQL in a Module

Geoff Codd

Registered User.
Local time
Today, 06:16
Joined
Mar 6, 2002
Messages
190
I'm trying to run the following code in a module, but can't get my head round it.

INSERT INTO DataWater ( Point_Id, [Date], Direct )
SELECT Direct_Reading_Meters_Without_Reading.Id, [Forms]![Report Criteria Selection]![Start_Date] AS [Date], "D" AS Direct
FROM Direct_Reading_Meters_Without_Reading
WHERE (((Direct_Reading_Meters_Without_Reading.Type)="Water"));

Any help always appreciated
Thanks
Geoff
 
You have two methods available for running update type queries easily:

DoCmd.RunSQL

or

CurrentDb.Execute
 

Users who are viewing this thread

Back
Top Bottom