Solved

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

Posted on 2011-09-29
2
410 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
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

696 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