General discussion


Synchronizing an Access list on a Form

By donq ·
I am working with Access 2000 (DAO)

On a form I have a field named ?caPK? (Country ID) and a list named ?SelList" that displays States (or whatever) by Country. There are to many records within SelList to effectively ?scroll? to my desired setting (6K +).

On the same form I have a combo box named ?QuikFind? that correctly indexes focus to the first ?caPK? within a set (states within a country) and loads saPK (First State, Territory, Province, or whatever) with the value needed to reset the focus within SelList. What code should I enter in the ?QuikFind? combo box?s After Update event to synchronize my forms list box so it's focus will change to the same state record? Thanks

QuickFind locates the Country first record ONLY and does not contain a state (?saPK?) value used to sort the list box. Once QuikFind executes however a populated saPK is available through the same form (Me) to reset focus within SelList. SelList.Requery just finds the first country and does not considersaPK as a filter.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Synchronizing an Access list on a Form

by Bob Sellman In reply to Synchronizing an Access l ...

I assume that SelList is the name of a combo box that displays the States/whatever for a country. If SelList is based on a query that includes the criteria that the country ID equals the value in caPK on this form, then the after update code for caPK should be the following, assuming saPK is the name of the control for picking the State:


This forces the query on which the saPK list is based to be reprocessed whenever the country changes. As a result, the "States" for theselected country will be displayed.

If you don't include this code, then the "States" for whatever was the first country displayed will be the States listed until you close the form and reload the form.

Collapse -

Synchronizing an Access list on a Form

by Shanghai Sam In reply to Synchronizing an Access l ...

Hay Bob, the first paragraph explains "SelList" is a list box (used for record navigation) on my Form. I copied your suggestion into QuickFind_AfterUpdate() and it had did no synchronize the list with its parent form even though both items are based on the same query.

I reworded the question and upped the points so look in for a 12/31/01 question before answering. Thanks

Collapse -

Synchronizing an Access list on a Form

by donq In reply to Synchronizing an Access l ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums