Solved

how to handle vba events in a subform integrated with a main form

Posted on 2011-09-29
2
413 Views
Last Modified: 2013-11-28
I have a field called SN in my main form.  In the after update event of this field, I run some code and it works well.  I also have a subform in this main form.  In this subform I have some code that opens a recordset and populates the SN textbox in my main form.  That works well as well.  The only problem is that the coding behind the SN field's afterupdate event is never triggered.  

How can I execute the coding in the SN afterupdate event in the main form once my subform populates this SN field?
0
Comment
Question by:sxxgupta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 36817060
try, make the afterudate event public
change Private to Public

* after running the codes that populates the SN textbox in my main form,
  call the afterUpdate event

me.parent.SN_Afterupdate
0
 

Author Comment

by:sxxgupta
ID: 36817472
sweet......thank you!!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question