[AccessD] Cannot run query in code.

Kaup, Chester Chester_Kaup at kindermorgan.com
Tue Sep 4 16:56:15 CDT 2007


Silly me. Thanks.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gmail
Sent: Tuesday, September 04, 2007 4:47 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Cannot run query in code.

Hi,
The error is caused because you have a SELECT Statement as your sql.  
This is not an Action Statement

You need an Action Statement (eg "insert into tmp_Hold_Source (fld1)
values
(2)")
Regards
Max
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Tuesday, September 04, 2007 10:33 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Cannot run query in code.

I have a module in which I compose several queries and run them. They
all
work fine. I added one more and now get a message of "A RunSQL action
requires an argument consisting of an SQL statement". Below is the
problem
code. I have run out of ideas as to what the problem is. A compact and
repair did nothing. Thanks.

 

strSQL = "Select * from Monthly_Appended "

DoCmd.RunSQL strSQL

 

Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

FAX (432) 688-3799

 

 

No trees were killed in the sending of this message. However a large
number
of electrons were terribly inconvenienced.

 

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list