Hi,
I have a combo box [cmbStoreNO] is attached to a query that filters the store numbers based on a date range. Since new store numbers can be added at any time, I need to be sure that the store number is in the query. I tried using me.cmbstoreno.requery on the before update and on enter but I get an error saying that the you must save the current field before requerying. What would the code for that look like? Or is there a better way to do this.
Thanks
Leesha
Requery A Combo Box
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Requery A Combo Box
On the Before Update and On Enter event of the combo box itself?
Wouldn't it be sufficient to requery the combo box in the On Current event of the form?
Wouldn't it be sufficient to requery the combo box in the On Current event of the form?
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1488
- Joined: 05 Feb 2010, 22:25
Re: Requery A Combo Box
Hi Hans,
The form that has the combo box that is causing the issue is frmSwitchboard. It allows the user perform quite a few number of operations. cmbStoreNo only shows stores that have invoices that have been generated. Each time a group of invoices are generated the combo box should update. Will the current event of the form do that?
Thanks,
Leesha
The form that has the combo box that is causing the issue is frmSwitchboard. It allows the user perform quite a few number of operations. cmbStoreNo only shows stores that have invoices that have been generated. Each time a group of invoices are generated the combo box should update. Will the current event of the form do that?
Thanks,
Leesha
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Requery A Combo Box
Is frmSwitchboard a "traditional" switchboard, with a table such as Switchboard Items as record source?
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1488
- Joined: 05 Feb 2010, 22:25
Re: Requery A Combo Box
No it is just a form that I've called frmSwitchboard that acts as a navigator for multiple controls and reports. It is not bound to anything.