473,503 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Action Queries

63 New Member
Hi,

I have a query

INSERT INTO GroupedOrderDetail_Bulk ( CustomerNo, OrderDate, RouteNo, SumOfQty, item )
SELECT OrderDetail.CustomerNo, OrderDetail.OrderDate, OrderDetail.RouteNo, sum(OrderDetail.Qty) AS SumOfQty, OrderDetail.item
FROM OrderDetail
WHERE (((OrderDetail.DeliveryMethod)=3))
GROUP BY OrderDetail.OrderDate, OrderDetail.RouteNo, OrderDetail.CustomerNo, Orderdetail.item
ORDER BY OrderDetail.OrderDate;


Now this query inserts records into a table. I need to run this query thru a VB6 script. Can anyone tell me how.

I did not know where to put this question (Access or VB forms) .

Thanx in advance
Oct 4 '07 #1
1 1137
Scott Price
1,384 Recognized Expert Top Contributor
If this is VBA, the answer is:
Expand|Select|Wrap|Line Numbers
  1. Dim MySQL as String
  2.  
  3. MySQL = "[YourInsertIntoStatement]"
  4.  
  5. DoCmd.RunSQL MySQL
However, VB6 is a different animal, with which I am not too familiar. If this is in fact, VB6, let me know and I'll move it over to the VB forum.

Regards,
Scott
Oct 4 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
4366
by: Coy Howe | last post by:
In tools options you can shut off the Confirm Action Queries. I am wondering is there a way to do this with access runtime. So when a program is distrubuted the action query confirmation box does...
13
4201
by: Lee | last post by:
Hello All, First of all I would like to say thank you for all of the help I have received here. I have been teaching myself Access for about 4 years now and I've always been able to find a...
8
1347
by: PC Datasheet | last post by:
If a subroutine runs twelve action queries, will they run one-at-a-time where one finishes before the next one starts or will one or more run simultaneously? If they don't run one-at-a-time, how...
4
1110
by: A.M | last post by:
Hi, Using ADO.NET, How can i execute action queries already saved inside an MDB file ? I already know that i can run sql commands like UPDATE and INSERT, but how can i run those ones already...
3
12572
by: ILCSP | last post by:
Hello, I'm fairly new to the concept of running action pass through queries (insert, update, etc.) from Access 2000. I have a SQL Server 2000 database and I'm using a Access 2K database as my...
5
10618
by: HS Hartkamp | last post by:
Hi all, I am working with fairly large databases (> 500 Mb / < 2,000,000 rexcords), and often need to do action queries on these. I have the feeling that much of the computing power is going...
1
1429
by: paullynch | last post by:
Problem running action queries: MS Access On running an access macro with runquery actions that run various action queries which create/delete and replace several tables, I am trying to avoid the...
2
2176
by: paullynch | last post by:
Database: MS Access Subject: SetWarnings macro action I am running macos to run several action queries that replace existing tables with new data based on parameter dates. There are several...
1
4174
by: ezderek | last post by:
For many years if I wanted to run an action query from code, I've used code something like this --- dim qd as query dim sSQL as string dim db as database set db = currentdb() sSQL = "UPDATE...
4
3591
by: destinman via AccessMonster.com | last post by:
I just installed MS Access 2007. Is there any way to turn off the confirmation of action queries in 2007 ? -- Message posted via AccessMonster.com...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.