Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox event

Status
Not open for further replies.

Hawkide

Technical User
Oct 8, 2003
159
US
Access 97

I have a form with a subform.
The main form has a multiselect listbox.

I want to refresh the subform when the listbox selection is changed on the main form.

I have been using the lost_focus event for the listbox, but I would really prefer to trigger the change when the listbox selection is made. It does not appear that any of the events for the listbox fire when an item is selected and/or reselected. I must be overlooking something, because I would imagine that this is a common need. TIA...
 
How does the selection relate with the subform ?
Provide us some of the code.

The listbox's click event is what I use on my forms.

John Borges
 
Try this.. Change appropriate name of the controls
Code:
[COLOR=blue white]Private Sub [b][COLOR=red white]MyListBox[/color][/b]_AfterUpdate()
	Me.[b][COLOR=red white]MySubForm[/color][/b].Requery
End Sub
[/color]
Regards

Zameer Abdulla
JVBP MDS
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
I already tried:

Private Sub MyListBox_AfterUpdate()
Me.MySubForm.Requery
End Sub

and it does not work...

I was able to make use of the listbox click event in a round about fashion. Thanks for the help...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top