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!

List box and switching between records

Status
Not open for further replies.

dafyddg

Programmer
Dec 2, 2003
92
GB
I'm working with Lotus Approach version 9.7 and need a bit of help.

I want to have a list box that displays the contents of a paticular field from a table to corespond to a number of field boxes on the same form. i.e. so when i click on one of the entries on list box the corresponding details for that entry will appear in the field boxes. I can't figure out which Macro to use for this or the correct options for it.

Cheers
 
You need to create a variable field, named vID say, of the same data type as the database field. Put it on the form and make it a listbox, with list created from the database field.

Create a named find that finds on the listbox selection. In Browse, from the menu, Create | Named Find/Sort | New | View. Click in the "real" id field and enter:

=@vID

as the find condition. Hit Enter, type a name for the find and OK out.

The named find can be run from the macro find command. It may be better to attach the macro to a button for the user to click after making the selection. The data change event doesn't fire until the listbox loses focus or the user presses Enter which is less intuitive than clicking a button.

Paul Bent
Northwind IT Systems
 
Thanks for that, i'll give it a try in work tomorrow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top