Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't Run Query 1

Status
Not open for further replies.

dblarch

Technical User
Mar 8, 2004
29
US
I have a table object and a pushbutton on a form. The table object is associated with the answer table created by the code attached to the pushbutton. When I press the button an error message on the status bar states that the table is already in use. All runs well when the answer table name is changed in the pushbutton code but, then the results are not displayed in the table object on the form. Rather, a table view shows the query results.

I noticed that the status bar states "1 of 1[:ANSWERS:TABLE_NAME] when the form is opened indicating that the table is indeed active.
 
When you open your form with a table object ie: the Answer table that table is then in use, now when you run your query you are trying to create a New Answer table and you can't do that because the table is already in use.

Two possible solutions:

1, Put the push button on a separate form, have it run the query then open the form with the answer table.

2, Put a dummy table on the form, run your query, empty the dummy table and then add the records from the answer table to the dummy table.

Hope this helps
Perrin
 
Thanks for your speedy help Perrin,

I've been exploring solution "1" with a twist. The pushbutton will call another form as a dialog box that will fit over the table object on the calling form.

dblarch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top