philippe pons
phpons at gmail.com
Mon Feb 9 11:30:11 CST 2009
Hi Andy, should the name of the cbo be cboSelChap, I can call cboSelChap_AfterUpdate. but if I pass this cbo to a procedure, like call myProc(me.cboSelChap) I think I can't do the following: Sub myProc(ByRef cbo as ComboBox) Call cbo_AfterUpdate This won't work, and I try to find the correct syntax, if any. I need to have only one pric that handles several combo. Thansk's for your answer, Phiippe 2009/2/9 Andy Lacey <andy at minstersystems.co.uk> > Hi Philippe > > Yes you can, and you just run it as a sub, so yourcbo_AfterUpdate should > work. Where are you calling it from though? If from outside the form the > cbo's on then you'll need to change the > > Private Sub yourcbo_AfterUpdate > > statement to Public Sub. > > -- > Andy Lacey > > > > > --------- Original Message -------- > From: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> > To: "AccessD at databaseadvisors.com" <AccessD at databaseadvisors.com> > Subject: [AccessD] Calling an AfterUpdate evnte proc. of a combo > Date: 09/02/09 16:11 > > > Hi all, > > I have a small proc. to which I pass a reference to a combo box. > This proc has to synchronize the combo on the first item > and run the AfterUpdate event proc. > > Private Sub syncCboTest(ByRef cbo As ComboBox) > ' syn de la cbo de s鬥ction du chapitre > cbo.SetFocus > cbo = cbo.ItemData(0) > ' Call cboSelChap_AfterUpdate > Call cbo_AfterUpdate '<= this won't work! > End Sub > > The question: > > How would you call the AfterUpdate event of a combobox that is represented > by it's reference?? > something like: cbo_AfterUpdate! > > If it is even possible! > > Best regards, > > Philippe Pons > -- AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > ________________________________________________ > Message sent using UebiMiau 2.7.2 > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >