473,471 Members | 4,629 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need to supress a open form command if the fieldto getting focus is [field1]

Hi,
I need some help here. I have a On Exit procedure on [items] that
opens a form. Whenever anyone clicks anything outside of it the form
opens.
No problem here.
But I need it not to open if the selected command is command317.
Both items and command 317 are on the first form from wich the second
one opens from. I would love any input.
T

Nov 13 '05 #1
4 1324
In your OnExit:

If Not (Screen.PreviousControl.Name = "command317") Then
DoCmd.OpenForm "TheFormIWantToOpenWhenIClickOutsideTheTextBox "
Darryl Kerkeslager

PS: You may want to look at the Access Naming Conventions. It will make
your posts more decipherable.

http://msdn.microsoft.com/archive/de...n_20naming.asp
"Mr. T" <ti*********@hotmail.com> wrote:
I need some help here. I have a On Exit procedure on [items] that
opens a form. Whenever anyone clicks anything outside of it the form
opens.
No problem here.
But I need it not to open if the selected command is command317.
Both items and command 317 are on the first form from wich the second
one opens from. I would love any input.

Nov 13 '05 #2
Thanks for the post
I think I misstated a fact actually I am in [items] and goin to any
other control or field. But I want the form not to pop up if they
clicked on [command317] wich forced the "items on exit command". So
actually the focus has never actually got to command 317. The focus
would be there if I had not interupted. But I need the form to pop up
every time the field [items] is exited except if a person selected
command 317 to exit.
Thanks T

Nov 13 '05 #3
Mr. T wrote:
Thanks for the post
I think I misstated a fact actually I am in [items] and goin to any
other control or field. But I want the form not to pop up if they
clicked on [command317] wich forced the "items on exit command". So
actually the focus has never actually got to command 317. The focus
would be there if I had not interupted. But I need the form to pop up
every time the field [items] is exited except if a person selected
command 317 to exit.
Thanks T


Then you need to use a different event. Perhaps a common function can be called
in the GotFocus of all controls except for the one command button.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #4
Ya thanks.
Is there a global got focus command or would it have to be inserted to
every field and command? And actually the main thing I was wondering
was if there was a property similar to:
screen.PreviousControl.Name
but instead for NextContol.name

But a global on GotFocus command would work.
Having to do it for every control and field would not be efficient.

Nov 13 '05 #5

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

Similar topics

1
by: reneecccwest | last post by:
hello, is there any way to indicte a cursor on the first text user input when a page loads without using onload in the body tag?
9
by: CW | last post by:
I wrote an HTML based chat application. The front end is built entirely on HTML + javascript. Essentially, I have a hidden frame that's refreshed frequently and any new messages are displayed in...
5
by: Darren DeCoste | last post by:
I have an access project with a Form that has a Command button to print the current record. I would like to Print the record 3 times, changing a text field on each print. The standard code of...
1
by: tdmailbox | last post by:
Is there a vb command that can tell me if I have focus in the child or parent form? Basicly I have a search macro that needs me to have focus to any field in the parent form. If my focus is set...
2
by: Vinny | last post by:
I'm writing a small ASP program which prompts the user for data. I would like to interactively validate the data as they are entering it, rather than waiting until they submit the form. So, I am...
2
by: Vinny | last post by:
A customer wants me to convert a VB app I wrote for them into a web app for remote users to do data entry. So, I'm writing a small ASP program which prompts the user for data, much like a VB...
46
by: Bruce W. Darby | last post by:
This will be my very first VB.Net application and it's pretty simple. But I've got a snag in my syntax somewhere. Was hoping that someone could point me in the right direction. The history: My...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
5
by: Thelma Roslyn Lubkin | last post by:
I am still having trouble trying to use a popup form to allow user to set filters for the main form. The main form is based on a single table. The popup contains 5 listboxes, so the user can...
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
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
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
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
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
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.