473,503 Members | 7,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Want an "Alert Message"before the operation

13 New Member
Hi, I wrote a RunSQL Macros to drop a table and used that on a button.
How should i add an "Alert" to it i.e; i should get an "Alert Message" as soon as i click that button.
May 8 '07 #1
4 2432
Denburt
1,356 Recognized Expert Top Contributor
You should get a prompt automatically anytime you drop a table. What does the SQl statement look like and how did you create this "Macro"?
May 8 '07 #2
JConsulting
603 Recognized Expert Contributor
Hi, I wrote a RunSQL Macros to drop a table and used that on a button.
How should i add an "Alert" to it i.e; i should get an "Alert Message" as soon as i click that button.
IF you have button code, add this.

Expand|Select|Wrap|Line Numbers
  1.  
  2. If MsgBox("You're about to delete a table, are you sure?", vbYesNo) = vbNo Then exit sub
  3. else
  4. 'run your macro here
  5. end if
  6.  
May 8 '07 #3
ssq
13 New Member
Macro: Action - RunSQL
Statement - drop table 'table name'
(or)
Action - DeleteObject
Object Type - Table
Object Name - Select the Table
But JConsulting, how should i call that Macro in the Code, button is not coded i am calling this macro in button properties 'On Click'
May 9 '07 #4
Denburt
1,356 Recognized Expert Top Contributor
But JConsulting, how should i call that Macro in the Code, button is not coded i am calling this macro in button properties 'On Click'
Change the onclick event to [Event Procedure] then click the button to the right of that field. You can run everything from code as per JConsulting's suggestion.


Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2. If MsgBox("You're about to delete a table, are you sure?", vbYesNo) = vbNo Then
  3.  exit sub
  4. else
  5. docmd.RunMacro("YourMacroName")
  6. end if
You could actually convert that macro into code as well. Let's see I haven't used that tool in so long...

Macro Conversion
May 9 '07 #5

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

Similar topics

2
3073
by: David Konerding | last post by:
Hello, I have written an app which opens a TCP connection to a server and uses a protocol to communicate with it. Specifically, I've written a python IMD client for the molecular dynamics...
6
46854
by: Matthew Louden | last post by:
The following ASP code yields the following error, but actually the new record is stored in database. The same error happens when the application deletes a record, such as sqlStmt ="delete from...
3
14712
by: Giulio | last post by:
I'm studying Craig Larman's "Applying uml and Patterns" (third ed.) reading at the book it seems (16.6) that Operations and Methods in a Class diagram are something different but it's not...
5
2120
by: galsaba | last post by:
When I run an "append query" or "Make a Table Query" I get a pop up window alert message that alerts me that I am goint to add rows, etc. How can I make my query that these alerts will not show...
13
38519
by: alvin.yk | last post by:
Hi, Normally, a piece of code such as <a href="http://www.yahoo.com" onclick="alert('hello');return false;">link</a> will stop the browser from actually going to href's destination....
1
1391
by: moho | last post by:
Hi, I've been struggling with AJAX for a while and notice that if I add the alert("xxx") in my code it always makes the code work. I'm using divs where I put the output from the server and then...
1
2434
by: -Lost | last post by:
This is more of a post to inform, unless of course I am missing something fundamental, in which case I would appreciate anyone explaining it. Based on Mr. Michaux's camelizeStyle function I...
11
1872
by: Bob Altman | last post by:
Hi all, I want to write a generic class that does this: Public Class X (Of T) Public Sub Method(param As T) dim x as T = param >3 End Sub End Class
24
8179
by: Jeremy J Starcher | last post by:
While reading c.l.j, I've noticed that some people prefer and indeed even recommend the use of "window.alert()" over "alert()". I can't find any technical reason to make this distinction, and...
0
7184
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
7253
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7313
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...
0
7438
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
5555
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,...
0
3156
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
1486
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 ...
1
717
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
365
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.