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
Tom van Stiphout wrote:
[Quoted Text] > On Sun, 23 Nov 2008 14:03:15 -0500, Jim <josmith2[ at ]sssnet.com> wrote: > > myListbox.RowSource = "" > 'Delete the table > > -Tom. > Microsoft Access MVP > > >> 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
|