Record in Listbox selected based on field

ScrmingWhisprs

I <3 Coffee Milk.
Local time
Today, 17:02
Joined
Jun 29, 2006
Messages
156
I tried giving this a thorough search here, but I came up blank.

I have a combobox on my Worker's form that displays a worker's Parish (church) that he/she belongs to. On the Double-Click event of the combobox, I have a Parish form that pops up. On this form, there is a listbox that displays all of the parishes in our system. From here users can add a new parish and edit a parish. They can also select a parish from the listbox and click a button on the form and that will update the Parish field on the main Worker form.

When the Parish combobox is Double-clicked, I would like to have the parish that is in the combobox selected in the listbox when the form is opened. The code I have in the OnLoad event of the Parish form is:
Code:
Me.lboParish.Value = Forms!frmEditWorker!ParishID.Column(0)
But that doesn't select anything in the listbox.

Thanks in advance.
ScrmingWhisprs
 
I think what you are suggesting is just the opposite of what I need accomplished, which I already have it doing.

I need to have the Parish pop up form's listbox to be selected when opened with whatever the combobox's value is on the main form.
 

Users who are viewing this thread

Back
Top Bottom