ListBox not updating form selection when changing listbox recordsource

Help.Chris

Registered User.
Local time
Today, 22:51
Joined
Oct 11, 2000
Messages
43
Hi Everyone,

I have a list box in a option group. Depending on what option is selected in the group, the contents of the listbox changes.

I have the listbox linking updating the form to show the item selected using the findfirst method.

This works when the form opens, and when you click on a selection(findfirst on afterupdate and on open form event)

When a different choice is made in the option group, the itemselected stays with with previous selection, ie option 1, selecting person with id3, then pressing option 2 which does not contain id3 does not update the form.

I have tried setting the listbox to selected(0)=true, but this then shows the first item is selected, but does not update the form with the details of this first selection. I have tried putting the findfirst method on the option group, but this makes no difference.

Does anyone have any idea how this can be accomplished.

Thanks for any help.

Chris
 
Chris:

The record source for you list box needs to be set so that it is dependant upon your check boxes. That is a field in the query for the list box needs its criteria set to the check box option group.

Then on the AfterUpdate for the option group all you have to do is requery the list box.

If you still can not figure it out from this send me an email and I will give you a sample.
 

Users who are viewing this thread

Back
Top Bottom