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

Change current record with Listbox 1

Status
Not open for further replies.

shteev

Programmer
Jul 15, 2003
42
0
0
I have a form which displays various fields from a record in a table. I've got those little arrow buttons at the bottom of my form so I can change the current form being displayed.

But I don't know how to add an element to the form myself which I can use to select the current form. What I want is a ListBox which contains all the records in the table, and to be able to click on a line in the ListBox to select the current record on the form.
 
shteev,

The easiest way is with a combobox. Open your form in design view, the select View->Form Header/Footer on the menu. Place a combobox control in the form's header section, and follow the wizard for "Find a record in my form based on my selection..."

HTH,

Ken S.
 
p.s. You can do the same with a listbox control, but a combo takes less space on your form. Your choice...

Ken S.
 
Cheers, that's working well!

One more thing on a related note: If I apply a filter to the recordset in the form, how do I update the listbox so that it displays the filtered list?
 
Is there a way to arrange the combobox in alphabetical order rather than record number?
 
Use an ORDER BY clause in the SQL code of the combo's RowSource.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top