473,396 Members | 1,898 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.

Trouble referencing a subforms.afterupdate event

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.Subform1.Subform1.cbocontrol.afterupdate. 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 4672
- 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 Expert Mod 8TB
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.Subform1.Subform1.cbocontrol.afterupdate. 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
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 Expert Mod 8TB
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
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...
0
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...
3
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,...
2
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...
21
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...
2
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...
2
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'...
1
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...
0
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...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.