From: kc-mass on 8 Mar 2010 19:10 Hi, I have a personnel form with typical personnel data. On the form is an combo that has a data source of employeeID, LastName, First name. The first (0) column is bound to the combo. The query that feeds the form references the combo as criteria against the employeeID. =[ME].[cboEmployee] Or Is Null The onchange event of the combo asks for a requery of the form Private Sub cboEmployee_Change() Requery Debug.Print "it fired" End Sub The event fires but the form does not requery. Any help appreciated. Kevin
From: Marshall Barton on 8 Mar 2010 19:58 kc-mass wrote: >I have a personnel form with typical personnel data. On the form is an >combo that has a data source of employeeID, LastName, First name. The first >(0) column is bound to the combo. > >The query that feeds the form references the combo as criteria against the >employeeID. >=[ME].[cboEmployee] Or Is Null > >The onchange event of the combo asks for a requery of the form > >Private Sub cboEmployee_Change() > Requery > Debug.Print "it fired" >End Sub > >The event fires but the form does not requery. The Change event is inapproprate. You should use the AfterUpdate event instead. Me is not allowed outside of a class module, use the full reference: =Forms![form name].[cboEmployee] Or Is Null -- Marsh MVP [MS Access]
From: kc-mass on 8 Mar 2010 20:19 Thanks Marshal but the form still does not refresh the data. It opens to the first record and stays there no matter how many times i select something from the combobox. Further ideas appreciated. Driving me nuts. Kevin "Marshall Barton" <marshbarton(a)wowway.com> wrote in message news:807bp59mijekhthqohk645m7dquc46t1a2(a)4ax.com... > kc-mass wrote: >>I have a personnel form with typical personnel data. On the form is an >>combo that has a data source of employeeID, LastName, First name. The >>first >>(0) column is bound to the combo. >> >>The query that feeds the form references the combo as criteria against the >>employeeID. >>=[ME].[cboEmployee] Or Is Null >> >>The onchange event of the combo asks for a requery of the form >> >>Private Sub cboEmployee_Change() >> Requery >> Debug.Print "it fired" >>End Sub >> >>The event fires but the form does not requery. > > The Change event is inapproprate. You should use the > AfterUpdate event instead. > > Me is not allowed outside of a class module, use the full > reference: > =Forms![form name].[cboEmployee] Or Is Null > > -- > Marsh > MVP [MS Access]
From: kc-mass on 8 Mar 2010 21:57 I just now had the afterupdate event do a debug.print of the cboemployee. It prints out what appear to be ordinals showing the position of the currently selected record. To check further I had it assign set a textbox to be equal to the cboemployee. that shows a legitimate employeeID. Any ideas??? Kevin "kc-mass" <connearney_AT_comcast_DOT_net> wrote in message news:O46iMayvKHA.4636(a)TK2MSFTNGP06.phx.gbl... > Thanks Marshal but the form still does not refresh the data. It opens to > the first record and stays there no matter how many times i select > something from the combobox. > > Further ideas appreciated. Driving me nuts. > > Kevin > > > "Marshall Barton" <marshbarton(a)wowway.com> wrote in message > news:807bp59mijekhthqohk645m7dquc46t1a2(a)4ax.com... >> kc-mass wrote: >>>I have a personnel form with typical personnel data. On the form is an >>>combo that has a data source of employeeID, LastName, First name. The >>>first >>>(0) column is bound to the combo. >>> >>>The query that feeds the form references the combo as criteria against >>>the >>>employeeID. >>>=[ME].[cboEmployee] Or Is Null >>> >>>The onchange event of the combo asks for a requery of the form >>> >>>Private Sub cboEmployee_Change() >>> Requery >>> Debug.Print "it fired" >>>End Sub >>> >>>The event fires but the form does not requery. >> >> The Change event is inapproprate. You should use the >> AfterUpdate event instead. >> >> Me is not allowed outside of a class module, use the full >> reference: >> =Forms![form name].[cboEmployee] Or Is Null >> >> -- >> Marsh >> MVP [MS Access] > >
From: kc-mass on 8 Mar 2010 22:18
Problem solved rebuilt form from scratch and works fine seems some level of corruption. Thanks "kc-mass" <connearney_AT_comcast_DOT_net> wrote in message news:O46iMayvKHA.4636(a)TK2MSFTNGP06.phx.gbl... > Thanks Marshal but the form still does not refresh the data. It opens to > the first record and stays there no matter how many times i select > something from the combobox. > > Further ideas appreciated. Driving me nuts. > > Kevin > > > "Marshall Barton" <marshbarton(a)wowway.com> wrote in message > news:807bp59mijekhthqohk645m7dquc46t1a2(a)4ax.com... >> kc-mass wrote: >>>I have a personnel form with typical personnel data. On the form is an >>>combo that has a data source of employeeID, LastName, First name. The >>>first >>>(0) column is bound to the combo. >>> >>>The query that feeds the form references the combo as criteria against >>>the >>>employeeID. >>>=[ME].[cboEmployee] Or Is Null >>> >>>The onchange event of the combo asks for a requery of the form >>> >>>Private Sub cboEmployee_Change() >>> Requery >>> Debug.Print "it fired" >>>End Sub >>> >>>The event fires but the form does not requery. >> >> The Change event is inapproprate. You should use the >> AfterUpdate event instead. >> >> Me is not allowed outside of a class module, use the full >> reference: >> =Forms![form name].[cboEmployee] Or Is Null >> >> -- >> Marsh >> MVP [MS Access] > > |