473,473 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to use input paramters in query again in macro

6 New Member
Dear all,

I have a delete query for users to delete a specific period of data. the SQL of the query is:

DELETE [TRADE].[TRADE_DATE]
FROM TRADE
WHERE ((([TRADE].[TRADE_DATE]) Between [Enter a specific start date (dd/mm/yyyy)] And [Enter a specific end date (dd/mm/yyyy)]));


And I want to use macro to display a msgbox to let user to confirm the date he has entered, I create the condition of CancelEvent like this:

MsgBox("Confirm deletion from " & [TRADE].[Enter a specific start date (dd/mm/yyyy)] & " ?",1)=2

However it doesnt work properly, it shows cannot find "TRADE"

I have no form in this database. What can I do? Thanks!
Jun 26 '07 #1
1 1346
MMcCarthy
14,534 Recognized Expert Moderator MVP
Dear all,

I have a delete query for users to delete a specific period of data. the SQL of the query is:

DELETE [TRADE].[TRADE_DATE]
FROM TRADE
WHERE ((([TRADE].[TRADE_DATE]) Between [Enter a specific start date (dd/mm/yyyy)] And [Enter a specific end date (dd/mm/yyyy)]));


And I want to use macro to display a msgbox to let user to confirm the date he has entered, I create the condition of CancelEvent like this:

MsgBox("Confirm deletion from " & [TRADE].[Enter a specific start date (dd/mm/yyyy)] & " ?",1)=2

However it doesnt work properly, it shows cannot find "TRADE"

I have no form in this database. What can I do? Thanks!
The delete query is used to delete a complete record not just a value in one column. You will need to use an update query.
Jun 29 '07 #2

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

Similar topics

2
by: John Ortt | last post by:
Hi All, I have a database in Access 97 which works fine but our company is converting from NT4 to XP Pro and in the process changing Office 97 for Office 2003. I have tried to convert the 97...
3
by: Fao, Sean | last post by:
Hello all, As stated in another message, it's been a long time since I've done any C coding and I'm not feeling comfortable that I'm doing this correctly. Basically, I'd like to verify that my...
8
by: FS Liu | last post by:
Hi, I am writing ATL Service application (XML Web service) in VS.NET C++. Are there any sample programs that accept XML as input and XML as output in the web service? Thank you very much.
9
by: skinnybloke | last post by:
Hi - I have 3 access queries which I run via 1 macro. Each of the queries now requires 2 parameters when they the run. The parameters are start and end dates. I have built the parameters...
1
by: Neha1184 | last post by:
When I link an Excel table to access and run query then a new table is created just fine. But if i run the query again i get an error"Numeric Field Overflow". If i open the query in design view and...
3
by: piaschaklanobish | last post by:
Hello, I was using MS Access 2003. I have a code of the following type: select * from test; I want to parametrize the name of my input file test with a macro variable such that everytime if...
1
by: Barb.Richards | last post by:
I have created an append query that pulls information from one database, and will append the selected information into a new table. The fields are setup like 'number' 'category' 'code' 'shares' and...
5
by: K Viltersten | last post by:
I discovered that when requested http://localhost:52698/ws3/page.aspx and issued a call Response.Write(Request.Params.Count); i got 50 parameters in count. When i actually added some as...
4
by: Newbie | last post by:
Hello I need to enter a string of the form abc (a string of characters followed by EOF) #include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX 100 int main(void) {
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
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.