Empty Listbox

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
 
S

Storrboy

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.
 
I

i_takeuti

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Clear Listbox Entries 6
Grouping Totals 2
empty listbox 1
Filter Listbox 1
VBA code to "skip" empty rows 5
Conditional testing 1
Passing parameters to a query 3
report parameter from listbox 2

Top