473,396 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Re: acc97, control.undo not restoring old value

"Phil Stanton" <ph**@myfamilyname.co.ukwrote in message
news:Oc******************************@posted.plusn et...
You might try

Private Sub MyControl_BeforeUpdate(Cancel As Integer)

If Nz(MyControl) = "" Then
MsgBox "Someting required"
Cancel = True
SendKeys "{ESC}"
End If

End Sub
AIUI the SendKeys method is frowned upon because it can send to whatever
window has the focus, be it your Access application or anything else.

Keith.

Sep 25 '08 #1
2 1410
Keith Wilby wrote:
"Phil Stanton" <ph**@myfamilyname.co.ukwrote in message
news:Oc******************************@posted.plusn et...
>You might try

Private Sub MyControl_BeforeUpdate(Cancel As Integer)

If Nz(MyControl) = "" Then
MsgBox "Someting required"
Cancel = True
SendKeys "{ESC}"
End If

End Sub

AIUI the SendKeys method is frowned upon because it can send to whatever
window has the focus, be it your Access application or anything else.

Keith.
That may be true. But if your form has focus, and the app is Access,
and you are doing a Sendkeys, how could it be sending the Sendkeys value
to any other window?
Sep 25 '08 #2
"Salad" <oi*@vinegar.comwrote in message
news:wZ******************************@earthlink.co m...
>
That may be true. But if your form has focus, and the app is Access, and
you are doing a Sendkeys, how could it be sending the Sendkeys value to
any other window?
Supposing you have a long procedure in your app and your user clicks on
another window whilst it runs. What would the SendKeys method do then?

Sep 25 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: lkrubner | last post by:
I'm offering users the ability to type weblog posts into a form and post them. They type the text into a TEXTAREA which is on a form. The form, when submitted, hits a PHP script. Before it is...
2
by: Tony Ciconte | last post by:
Iam trying to distribute a runtime Acc97 program using the ODE, Wise Installer, and SageKey scripts. Everything has been working great until I recently tried to include the MSINET.OXC internet...
2
by: Lyn | last post by:
Hi, I have a text control on a form which is bound to table field StartDate which is in Date format. When updating the table record via the form, any data entered into the StartDate control is...
5
by: Lyn | last post by:
Hi, In the BeforeUpdate event of a textbox control I have the following simplified code:- Private Sub StartDate_BeforeUpdate(Cancel As Integer) MsgBox "StartDate Error -- Please Check and...
11
by: Brian W | last post by:
Yet another editor problem To reproduce do the following 1) Open a Webform and switch to HTML edit mode 2) Enter the Following (include spaces) This is some text before <asp:hyperlink...
2
by: planetthoughtful | last post by:
Hi All, I'm building some reports in Acc97 and using a custom calendar form to allow users to pick dates with which to report. I'm wondering if there's an easy way in code to be able to...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, Does vb2005 have a built-in UnDo feature / object for applications so that I can undo actions like other windows apps? Or do I have to write my own UnDo routine? If vb2005 does have a...
4
by: =?Utf-8?B?Sm9uIEVsbGlz?= | last post by:
Hi All, I want to implement an 'generic' undo by placing a copy of a control in a stack using System.Collections.Generic.Stack. Basically this way I don't need to know if a user has edited text...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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
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...

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.