473,651 Members | 3,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble referencing a subforms.afteru pdate event

3 New Member
Hello All-
I am trying to reference a subform's afterupdate event that is 3 deep and am having some trouble getting it to work. The control is a combo box and i cannot seem to trigger the afterupdate event from another subform. The control is on Mainform.Subfor m1.Subform1.cbo control.afterup date. I am able to plug in a value, but i need to have the event called in order to populate the form.

I am trying to refernce it with the following syntax:
[Forms]![frm_Main]![frm_Subform1]![frm_Subform2] _
.Form![cbo_Control].AfterUpdate

Any help would be great-
thanks in advance
Feb 6 '08 #1
4 4696
bcallnan
3 New Member
- Hiya- I satisfied this post, but still think that there must be a better way. I was able to call the event by going to the control in the subform and updating its .gotfocus event to refernce the .afterupdate event. Seems a little forced. Any other ideas?
-thanks in Advance
Feb 6 '08 #2
Rabbit
12,516 Recognized Expert Moderator MVP
Hello All-
I am trying to reference a subform's afterupdate event that is 3 deep and am having some trouble getting it to work. The control is a combo box and i cannot seem to trigger the afterupdate event from another subform. The control is on Mainform.Subfor m1.Subform1.cbo control.afterup date. I am able to plug in a value, but i need to have the event called in order to populate the form.

I am trying to refernce it with the following syntax:
[Forms]![frm_Main]![frm_Subform1]![frm_Subform2] _
.Form![cbo_Control].AfterUpdate

Any help would be great-
thanks in advance
You have to use the call command. You have to set cbo_Control's AfterUpdate sub header to public. You're also referencing the Sub incorrectly.
Expand|Select|Wrap|Line Numbers
  1. Call Form_frm_Subform2.cbo_Control_AfterUpdate
  2.  
And this will only work if:
Expand|Select|Wrap|Line Numbers
  1. Private Sub cbo_Control_AfterUpdate()
  2.  
is changed to:
Expand|Select|Wrap|Line Numbers
  1. Public Sub cbo_Control_AfterUpdate()
  2.  
Feb 6 '08 #3
bcallnan
3 New Member
Thanks Rabbit!-
I used this and all worked great!
-- I noticed I posted the code wrong- Will not in the future. Thanks again
Feb 6 '08 #4
Rabbit
12,516 Recognized Expert Moderator MVP
Not a problem, good luck.
Feb 6 '08 #5

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

Similar topics

1
7466
by: JJMM | last post by:
Hi, I have a form (form1) with a large number of subforms inside it (around 20 subforms), There is the possibility of filtering the data using a pop-up form that create/change a query (all the subforms are linked to that query), Once that I create/change the query (using the pop-up form), Is there any easy way to update all the 20 subforms inside form1?. Normally I use to change the recordsource in each subform to show the
0
1971
by: Jenni | last post by:
I currently have a query that is joining two distinct pools of information and turning them into one records with a unique identifier This query is dependent on criteria passed from a form in a number of text and combo boxes. This part of the form works fine. On Open a Tab control is displayed but the subforms in each of the three tabs are hidden until the required info is gathered from the user. The subforms are then displayed,...
3
3837
by: Diana Gard | last post by:
Perhaps this is a design flaw, please let me know. I'm using Access 2000. I have a form with a tab control and 5 subforms within those tabs. The forms match with the tables: Client main, Intake, Financial, Fees, Payments, Bills, Bill Line Items. The design works thusly - Client Main relates to Intake. Intake relates to financial. Financial relates Fees, Payments and Bills. Bills relates to Bill Line Items. On the form, I use the...
2
4036
by: tlyczko | last post by:
I have a main form with 2 subforms, each subform references different data in the same table. How do I make sure each subform only creates NEW records in the referenced table and do not overwrite or change data in previously created rows?? Otherwise I have to use two different tables, with similar kinds of data, for each subform, which may well be the way to go even though it's not really normalized, to make the data entry easier and...
21
5093
by: cmd | last post by:
I have code in the OnExit event of a control on a subform. The code works properly in this instance. If, however, I put the same code in the OnExit event of a control on a Tab Control of a main form, the code errors out at the 2nd line. The error number is 13 and the description is "Type mismatch". Both controls are memo fields. I suspect that "Screen.ActiveControl.Parent" is not referencing the form as intended. Thanks for any help,...
2
2276
by: gazelle04 | last post by:
I want to catch events between subforms whenever I changed data on the first form and click on the second form. I'm on the main form. The main form consists of two subforms. I want to catch the editing of records on both. Let's say I changed data on the first subform and then I went to the next subform. I used LostFocus, DeActivate, Exit events but its not cathing the procedure for confirming the update. Only the AfterUpdate event catches...
2
1765
by: Ron | last post by:
Hi All, I've got a main form (frmMain) with 5 subforms on it. All subforms are linked to different hidden controls on frmMain. The purpose of this form is to record payments by 'source' (batches) so frmMain's source is a query on BatchPaymentID. New 'source' for payment, new BatchPaymentID. 1st subform (sfrmOne) is a client list of just the client's that would have that source of payment. Next subform (sfrmTwo) is a list of charges...
1
1690
by: isoquin | last post by:
Hello- I have one form frmProject1 (record source tblProject1), with two subforms within it: 1) frmPayroll (tblPayroll), and 2) frmTimes (tblTimes) Basically, there are multiple different tblProject(n) where n is some number. While the details of each is stored via their respective forms, all of the forms need to link to tblPayroll and record higher-level information (employee, amount of time, etc). So far, this hasn't been a problem....
0
2377
by: TD | last post by:
I have a main form with two subforms (both in datasheet view), neither of which are linked to the main form. The main form is based on a query that uses the bound column of a combobox on the main form as the criteria for the query. The combobox is based on a query that retrieves the name and record id of the customers. In the afterUpdate event of the combobox on the main form and both subforms are requeried. The first subform is based...
0
8278
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8807
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8701
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7299
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5615
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1912
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.