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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Box

Status
Not open for further replies.

Ajwebb

MIS
Jul 31, 2003
153
0
0
GB
How do you make a list box take you to a record?

TIA
 
Do you mean if you click on an item in a listbox it will open a form with that record displayed?

Chris Haufschild
chaufschild@hotmail.com
 
The simplest thing is to filter the form's underlying recordsource by the selected value in the listbox.

Me.RecordSource = "Select * from tblReports where ReportID = " & Me.lstReports & ";"

You'll need to enter the correct values for your bound column and listbox.

Mark
 
The simplest thing is to filter the form's underlying recordsource by the selected value in the listbox.

In the listbox AfterUpdate event, enter the following (error handlers, etc. removed for clarity)

Me.RecordSource = "Select * from tblReports where ReportID = " & Me.lstReports & ";"

You'll need to enter the correct values for your bound column and listbox.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top