Unanswered: Any way to requery on a data entry form?
First field on the form is to select a particular 'sporting event'. Second field on the form is to select a customer.
The second field is a combo box tied to a query that only selects customers that aren't already engaged in a sporting event during the same time frame. The query works fine.
If the sporting event combo is changed after the data entry form is saved (say the event was chosen incorrectly the first time), the customer query combo will not update to the reflect customers that should be available for a different sporting event. I have a subform running the same customer query (to include additional customers) which does change after a refresh. Requery will not work on the customer combo box either.
The only way I can get it to refresh is to delete, and start a new data entry. This is not acceptable.
Here's the sequence of events... (I'm using 'event' to signify sporting event)
1. Open form in data entry mode
2. Select an 'event' (first foreign key)
3. The customer combo box is populated with the query results based on the 'event' selection
4. Customer detail is selected from the combo box.
5. Form can now be saved.
By this point, I should be able to change the 'event' selection, refresh the form, and the customer combo *should* show me the query results based on the different 'event'. This simply doesn't happen.
Do you have both a Control Source and a Row Source specified for the customer combo? If so, lose the Control Source and try it again. Please make sure the Customer combo Row Source Type property is set to "Table/Query" and NOT to "Value List." Also, please copy and paste the code you have in the AfterUpdate event of the Sports event combo; and please copy and paste the customer combo Row Source SQL statement. These should give us a better idea what's happening.
By the way, what version of Access are you running, and what version is the database?
I was running a macro from the macro page, rather than from a button on the form (for testing purposes). I've hooked up a button on the form with a requery macro, and this is working fine.
Dunno what it is about posting on a forum for help... I always end up finding the mistake myself. Is it similar to thinking out loud, or maybe it's just my aptness for making myself look like an idiot? One way or another, it helps.
Thanks for throwing some thoughts in this direction