Re: Combo Box Requery Not Working w/On Current
- From: Steve Schapel <schapel@xxxxxxxxxxx>
- Date: Sat, 23 Dec 2006 20:40:13 +1300
Andy,
As you mentioned, the combobox is unbound. As such it is unrelated to your data. As such, it does not "know" which is the current record on the main form. I am not sure precisely what you need to do to correct this situation, but no amount of requerying will have any effect. If you want the combobox's value to reflect the movement through the records, it either has to be bound to a field in the form's underlying record source, or else you will need to use code to explicitly assign a value to it.
--
Steve Schapel, Microsoft Access MVP
Andy wrote:
Hi;.
Have a main form, (frmCustomers), with a Tabbed Control that contains two sfrms, (sfrmCustomerAdditionalInfo and sfrmPurchasing).
When the user clicks on the Tab=sfrmPurchasing an Unbound Combo Box, (its row source is Tbl/Qry), appears displaying a list of "Packaged Products". The Combo Box's Default Value is: "Click Here to Display Package List".
When the user selects a package the underlying information populates the controls in sfrmPurchasing.
All of this works correctly.
What is not working correctly is when the user goes to a previous or new record on the main form. The Combo Box should display what was selected in a previous record and in a new record display the Default Value. It doesn't. In all records it displays what was selected previously. Meaning if while in record 6 the user selects "Package 1" all of the records show "Package 1".
Have tried "Me!cboPackagedItems.Requery" in the On Current event of the frmCustomers and
"Forms!frmCustomers.cboPackagedItems.Requery" in the On Current event of the sfrmPurchasing.
Should I be using "Requery"? Where should the "Requery" be placed? Does the name of the Tab need to be Included?
Is the statement "Forms!frmCustomers.cboPackagedItems.Requery" in the On Current event of the sfrmPurchasing correct?
Would someone be so kind and point me in the right direction?
Thank You for taking the time to read this post.
Andy
- Follow-Ups:
- Re: Combo Box Requery Not Working w/On Current
- From: Frank Schwab
- Re: Combo Box Requery Not Working w/On Current
- Prev by Date: Re: DCount Issue
- Next by Date: Re: DCount Issue
- Previous by thread: Re: Combo Box Requery Not Working w/On Current
- Next by thread: Re: Combo Box Requery Not Working w/On Current
- Index(es):
Relevant Pages
|