List Box Question

  • Thread starter Thread starter Garth
  • Start date Start date
G

Garth

I have a list box that opens showing several or all
entries posted to a specific customer. If I want to
change some information on a particular item I want to
just select (double click) the item. How do I capture the
information for just that selected item?
i.e.

Customer Load# Del#
XYZ 1600 1
XYZ 1610 1
XYZ 1610 2
XYZ 1650 1

I want to select XYZ, load 1610, del# 2 and have a form
display only that information.

I hope I am clear on my explanation. Your help is
appreciated.
 
Step 1
Put a uniqueId on the table in question. For the sake of
explanation, call it delId

Step 2
Write a query to select delId, Customer, Load#, Del# from
your table (make delId the first column)

Step 3
In you list box, set the Row Source Type to "Table/Query" ,
make the query the RowSource, set the Bound Column to 1 and
, if you don't want to see the delId in the list, make the
first column width 0

Step 4
Write code in the listbox_AfterUpdate() method

DoCmd.ApplyFilter "delId = " & listbox.value

Hope That Helps

Gerald Stanley MCSD
 
Back
Top