A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calling an event on main form from a subform



 
 
Thread Tools Display Modes
  #1  
Old July 2nd, 2004, 03:58 PM
arm
external usenet poster
 
Posts: n/a
Default Calling an event on main form from a subform

Hi! Could anyone please help me how to call an event on main form from a
subform. Thanks.


  #2  
Old July 2nd, 2004, 04:44 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default Calling an event on main form from a subform

Remove the word "Private" from the event procedure you wish to call. For
example change:
Private Sub Button1_Click()
to:
Sub Button1_Click()

Then from the subform:
Call Me.Parent.Button1_Click


Another alternative, assuming the main form is named "Form1":
Call Form_Form1.Button1_Click

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"arm" wrote in message
...
Hi! Could anyone please help me how to call an event on main form from a
subform. Thanks.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recordset in subform based on field in parent form Lyn General Discussion 15 June 14th, 2004 03:10 PM
Filter subform combobox on option button in main form Emma Using Forms 1 June 12th, 2004 12:24 AM
Filter subform combobox on option button in main form Emma Using Forms 2 June 11th, 2004 10:29 PM
Subform not open - but it is on open main form??? Paula Using Forms 1 June 7th, 2004 05:32 PM
Controls on Main form affecting subform? Will Setting Up & Running Reports 1 May 27th, 2004 07:37 PM


All times are GMT +1. The time now is 02:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.