Change the WHERE clause in the listbox's RowSource.
This example shows how to exclude agencies 5 and 6 from the list box:
Me.[List0].RowSource = "SELECT AgencyId, AgencyName FROM tblAgency WHERE
AgencyId NOT IN (5, 6) ORDER BY AgencyName;"

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> How do you delete an item from a listbox?
if your listbox is based on table values then you can delete from the table
and then requery your listbox
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * FROM TableName WHERE FieldName = '" &
ListBox.Column(0, ListBox.ListIndex) & "'"
ListBox.Requery
DoCmd.SetWarnings True
> How do you delete an item from a listbox?
James - 28 Apr 2005 15:02 GMT
Thank you for your help. It loooks like it is trying to work but I get an
error: "Data type mismatch in criteria expresion"
The field in the table is an autonumber field. Is that a problem and how do
I fix it?
> if your listbox is based on table values then you can delete from the table
> and then requery your listbox
[quoted text clipped - 5 lines]
>
> > How do you delete an item from a listbox?
Dennis - 28 Apr 2005 15:08 GMT
If the item in the listbox and table is numeric instead of text then change
the 1 line to
DoCmd.RunSQL "DELETE * FROM TableName WHERE FieldName = " &
ListBox.Column(0, ListBox.ListIndex)
> Thank you for your help. It loooks like it is trying to work but I get an
> error: "Data type mismatch in criteria expresion"
[quoted text clipped - 11 lines]
> >
> > > How do you delete an item from a listbox?
James - 28 Apr 2005 15:02 GMT
Thank you for your help. It loooks like it is trying to work but I get an
error: "Data type mismatch in criteria expresion"
The field in the table is an autonumber field. Is that a problem and how do
I fix it?
> if your listbox is based on table values then you can delete from the table
> and then requery your listbox
[quoted text clipped - 5 lines]
>
> > How do you delete an item from a listbox?