I have a form with about 6 tabs in it.
The "Items" tab has a sub form with a continuos form it which one department enters a list of items to be repaired. (Data goes into an "items" table)
Another department uses a "Parts Used" tab to enter a list of parts used in the repair. (Data goes into a "Parts" table.
I have a combo box on the Parts Used" tab which looks at a query on the items table and shows the item numbers for the current record. A kind of filter in the combobox I guess.
This works fine when you drop the list down the first time. If you have two entries in the Item form it shows the two items, as it should.
However when you change record and then drop the list down again, it still shows the list from the first record, and not the item numbers for the current record.
It's as if Access is caching the combo box list, and not rerunning the query.
This is what I have in my combo box source field
SELECT QryPartsReplacedLookup.ItemNo, QryPartsReplacedLookup.Description, QryPartsReplacedLookup.ReturnNo FROM QryPartsReplacedLookup WHERE (((QryPartsReplacedLookup.ReturnNo)=Forms![Returns Report]![Returns Detail].Form!ReturnNo));
How can I get round this? Some sort of a requery when the control gets focus perhaps??
Cheers
Griff
The "Items" tab has a sub form with a continuos form it which one department enters a list of items to be repaired. (Data goes into an "items" table)
Another department uses a "Parts Used" tab to enter a list of parts used in the repair. (Data goes into a "Parts" table.
I have a combo box on the Parts Used" tab which looks at a query on the items table and shows the item numbers for the current record. A kind of filter in the combobox I guess.
This works fine when you drop the list down the first time. If you have two entries in the Item form it shows the two items, as it should.
However when you change record and then drop the list down again, it still shows the list from the first record, and not the item numbers for the current record.
It's as if Access is caching the combo box list, and not rerunning the query.
This is what I have in my combo box source field
SELECT QryPartsReplacedLookup.ItemNo, QryPartsReplacedLookup.Description, QryPartsReplacedLookup.ReturnNo FROM QryPartsReplacedLookup WHERE (((QryPartsReplacedLookup.ReturnNo)=Forms![Returns Report]![Returns Detail].Form!ReturnNo));
How can I get round this? Some sort of a requery when the control gets focus perhaps??
Cheers
Griff