Michael R Mattys
michael.mattys at adelphia.net
Thu Feb 20 20:00:00 CST 2003
Hi Marcel, Charlotte, Patricio and Group You may also want to look into CreateEventProc after you've made sure that the property sheet = "" or else collect all the lines in the module and use the InsertLines method at the appropriate place. Mike Mattys ----- Original Message ----- From: "Charlotte Foust" <cfoust at infostatsystems.com> To: <accessd at databaseadvisors.com> Sent: Thursday, February 20, 2003 8:42 PM Subject: RE: [AccessD] Programmaticly fill control events > You have to use the correct name for the event property, which is > something like AfterUpdate, OnEnter, OnOpen, OnClose, etc.. The "click" > event property name is OnClick, so it would be: > > frm!controlname.OnClick = "[Event Procedure]" > > If you have referenced a specific control object, the event names will > show up in intellisense as properties of the control. > > Charlotte Foust > > -----Original Message----- > From: Patricio Galleguillos [mailto:pgalleguillos at plus.cl] > Sent: Thursday, February 20, 2003 5:18 PM > To: accessd at databaseadvisors.com > Subject: RE: [AccessD] Programmaticly fill control events > > > Hi Marcel, Charlotte and Group > > Making some testing I generated a form that 'writes' code to another > form and in this latter one I got: > > '------------------------------------------------- > Option Compare Database > Option Explicit > > Private Sub Texto5_Click() > Debug.Print 44.56, 55.48 > > End Sub > > Private Sub txtForTesting_Click() > Debug.Print 44.56, 55.48 > > End Sub > '------------------------------------------------ > > So far, so good but when I open the form to see if the events fire, > gunpowder seems to be wet... and the magic words [Event Procedure] did > not appear as I thought. > > Also I think Marcel wants to specify the event with a string "click" for > example and I don't see the way to associate with your code > > frm!controlname.click = "[Event Procedure]". > > With this 'detail', Marcel's problem would be practically solved, also > the IDE ask's if I want to save which I obviously want. Case this cannot > be avoid I think 200 clicks would be a bargain for so many 'coded > events' > > Muchos Saludos > Patricio Galleguillos