delete the source table for a displayed listbox

J

Jim

I'm running Access 2003.

I have a listbox on my form that will contain data that is a result of a
query based on user input.

If I try to delete the table or run a make table query, I get an error
message saying it can't delete it because the table is in use.

Is there a way around this and still have the listbox on this form?

Jim
 
J

Jim

Thanks that cleared the delete problem but now after I run the query to
make the table and set the listbox visible I get a blank box.

lst_2Bprinted.Visible = False
lst_2Bprinted.RowSource = ""
DoCmd.DeleteObject acTable, "tbl_apLabels"

lst_2Bprinted.RowSource = "qry_apLabels"

DoCmd.OpenQuery "qry_EnvAdrList", acViewNormal
lst_2Bprinted.Visible = True
Me.Repaint
======
qry_apLabels is a subset of tbl_aplabels and is the row source for the
listbox. If I take out all delete and the openQuery - just display
qry_apLabels the listbox works.


Jim
 

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

Top