Re: SYNC Form to listbox




Jeff L wrote:
Requery List7 after you set the Row Source: Me.List7.Requery
Call the click option for List7: Call List7_Click

Still takes two clicks on the option button to sync. Modified code:
--------------------------------------------------------
DoCmd.GoToControl "[List7]"
Me![List7].Requery
Call List7_Click
Me.[List7].Selected(1) = True
-----------------------------------------------------------
Conceptually, what you have suggested should have worked, since it adds
a "click". However, if I try it after "Me.[List7].Selected(1) = True",
I get an an error message that the action was cancelled by an undefined
object. The reason for attempting to put "click" after
"Me.[List7].Selected(1) = True" is that this where the code hangs
(requires the double click). Prior to this line the value of the first
entry has not yet been selected so a click would be on value that had
not yet been established.

I am thinking of an alternative approach, that being a cloned recordset
based on the option box criteria and then displaying the first record.
I am reading one of the programming books on how to use a cloned
recordset.

.