Empty Listbox

  • Thread starter Thread starter Asif
  • Start date Start date
A

Asif

I have a form (2-a SKIPPROCESS) which contains three lists boxes ,
Cables, Copper and General. They extract the date and quantity from
each bin i.e. Cables, Copper and General from a table called tbl_LIVE.
Now the listboxs are run from a query to seperate the three bins so
that each list box contians the date and quanity only related to that
bin.

Under each listbox i have a command button "Empty" when I click on
this a form (frm_Empty) pops up saying "You are about to empty Cables
Skip" and the total quanity of that skip is displayed. If I click on
the OK button the first record highlighed in the listbox is deleted.
What I want is for the contents of the list to be deleted.

I'm using a delete query which contains the fileds of tbl_LIVE i.e.
LVID and LVWEIGHT. The criteria I've placed under the LVID section is
"[Forms]![2-a SKIPPROCESS]![Cables]"

Any help as to how I can go about solving this issue?

Thanks
 
Asif said:
I have a form (2-a SKIPPROCESS) which contains three lists boxes ,
Cables, Copper and General. They extract the date and quantity from
each bin i.e. Cables, Copper and General from a table called tbl_LIVE.
Now the listboxs are run from a query to seperate the three bins so
that each list box contians the date and quanity only related to that
bin.

Under each listbox i have a command button "Empty" when I click on
this a form (frm_Empty) pops up saying "You are about to empty Cables
Skip" and the total quanity of that skip is displayed. If I click on
the OK button the first record highlighed in the listbox is deleted.
What I want is for the contents of the list to be deleted.

I'm using a delete query which contains the fileds of tbl_LIVE i.e.
LVID and LVWEIGHT. The criteria I've placed under the LVID section is
"[Forms]![2-a SKIPPROCESS]![Cables]"

Any help as to how I can go about solving this issue?

Thanks

I'm not really following you. If the listbox rowsource is a query, then
emptying the underlying table with the delete query, then requerying the
listbox would reflect the table changes. If there are still records in the
table after the delete query runs, then the listbox will show them.
 
Asif said:
I have a form (2-a SKIPPROCESS) which contains three lists boxes ,
Cables, Copper and General. They extract the date and quantity from
each bin i.e. Cables, Copper and General from a table called tbl_LIVE.
Now the listboxs are run from a query to seperate the three bins so
that each list box contians the date and quanity only related to that
bin.

Under each listbox i have a command button "Empty" when I click on
this a form (frm_Empty) pops up saying "You are about to empty Cables
Skip" and the total quanity of that skip is displayed. If I click on
the OK button the first record highlighed in the listbox is deleted.
What I want is for the contents of the list to be deleted.

I'm using a delete query which contains the fileds of tbl_LIVE i.e.
LVID and LVWEIGHT. The criteria I've placed under the LVID section is
"[Forms]![2-a SKIPPROCESS]![Cables]"

Any help as to how I can go about solving this issue?

Thanks
 
Back
Top