473,513 Members | 3,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SubForm OnExit Event

26 New Member
Folks,

I'm trying to interrupt an OnExit event if the user clicks on a particular control. Frankly not sure if the OnExit event allows this. Here's the position:-

There's a main and sub form. I'm looking at the OnExit event of the subform which offers just two events - OnEnter and OnExit. The OnExit event does some processing for all the records on the subform. Part of this processing tells the user that there are one or more incomplete records and that's OK if the user wants to click one of several buttons on the main form that process the subform data in various ways but not if they try to change the main form record (the Main Form uses a date field tied in with a Calendar Control).

What I'd really like to do is, under the OnExit, event, is give a warning message if they go to some controls on the main form but not others.

Happy to post the current code if that helps and TIA for any help on this. I'm currently using Access 2002 and Win XP.

Regards

Helm
Feb 11 '08 #1
2 2990
ADezii
8,834 Recognized Expert Expert
Folks,

I'm trying to interrupt an OnExit event if the user clicks on a particular control. Frankly not sure if the OnExit event allows this. Here's the position:-

There's a main and sub form. I'm looking at the OnExit event of the subform which offers just two events - OnEnter and OnExit. The OnExit event does some processing for all the records on the subform. Part of this processing tells the user that there are one or more incomplete records and that's OK if the user wants to click one of several buttons on the main form that process the subform data in various ways but not if they try to change the main form record (the Main Form uses a date field tied in with a Calendar Control).

What I'd really like to do is, under the OnExit, event, is give a warning message if they go to some controls on the main form but not others.

Happy to post the current code if that helps and TIA for any help on this. I'm currently using Access 2002 and Win XP.

Regards

Helm
I'm looking at the OnExit event of the subform which offers just two events - OnEnter and OnExit.
These 2 Events are NOT Events related to the Sub-Form since Controls have an Exit Event, whereas Forms do not. These Events are related to the Sub-Form Control itself which actually contains the Sub-Form. To see what the actual Sub-Form is: Select the Sub-Form Control ==> Properties ==> Data Tab ==> Source Object. This Source Object is the Sub-Form and it has approximately 24+ Events associated with it as does all Forms. Another way to access the properties of the Sub-Form itself is to Click on the little square in the Upper Left Corner of the Sub-Form Control ==> View ==> Properties. Of course you can always open the Sub-Form in Design View in the Database Window. Please be a little more specific about what you are trying to accomplish, I'm sure someone here can help.
Feb 12 '08 #2
helm
26 New Member
ADezzi,

My apologies for this tardy response to your response. I'd expectd an email along the lines 'someone has responded to your post'. My fault entirely.

I did as you suggested and concluded that the answer to my problem was to set a test for each control that the user might select and take action accordingly (rather than to seek to do this inside the OnExit event.

Thanks and apologies again.

Regards, Helm
Feb 20 '08 #3

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

Similar topics

4
10168
by: Corepaul | last post by:
I am a newbie using Access 2000. I am using the following test in the txtAlbum OnExit procedure to prevent leaving an empty text box for a required field If (IsNull(txtAlbum.Value)) Or (Len(txtAlbum.Value) < 1) Then MsgBox("Album Title cannot be empty") txtAlbum.SetFocus End If
1
680
by: sixsoccer | last post by:
I have built a database with a <Mainform> and a <Subform>. My problem is twofold. 1. My subform is set as a continuos form with AllowAddiotions set to NO (ie. a list of Issues to the client on the mainform) 2. To add new issues, a button is used and a pop-up form is used to add an issue with more detail than what's available on the...
25
10171
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab...
0
1106
by: David Mitchell | last post by:
I have a form (frmAcq) which the user enters details of goods received including the total number of items received. The form has a subform (sfmAcqDetail) in which the user enters a breakdown of products received, their price, quantity etc. I have set the on exit event to check if the sum of the quantity field on the sub form matches the...
4
6969
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the user enters the last qualifying field on the main form. In one case this works fine, the subform shows the data the user wants to update -- which...
6
3911
by: Sally | last post by:
I need to be able to click in a subform and run code but at the same time I need to be able to scroll the records without running the code. I tried coding the Enter event of the subform control but when I try to scroll the records the code runs. The subform is continuous; all the controls are on one line and the detail section is not exsposed...
4
8805
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form which allows me to edit the record in the subform. What I want to happen is for subform with the new edits to be updated on the main form when I...
9
3636
by: ApexData | last post by:
My main form has tab-pages. On each tabbed page is a subform control containing a different subform. When a user selects a specific tab and begins to edit a record, I need a way of preventing the user from clicking on another Tab. I don't want to make the other tabs invisible. I tried setting the subForm so that the user is in...
5
7500
by: TomK | last post by:
I would like to use the oncurrent event of a subform. The subform class seems to offer onEnter and onExit only, so I tried up to set the event handling routine programatically. It works fine with a macro: MySubForm.Form.OnCurrent = "MyMacro" But what about using VBA code? What procedure name does Access expect after having found ...
0
7178
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7563
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7125
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5703
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5102
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
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 we have to send another system
1
813
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.