Unable to make or add tables to a query

Copper Contributor

I'm unable to make a query. When I'm in Query Design modem either for a new or existing query, the "show table" button doesn't do anything. I'm unable to get any new tables to appear available in the query design.

 

I am reviving an old database with a split front/back.  Everything works fine and I can edit everything including queries except for adding tables to queries. 

6 Replies

@snowbdr That is an unusual problem, and one that calls for additional details in order to guess what might be causing this. For example, one possibility could be that this is an accdE, not an accdB. Is that that case? 

 

In any case, new tables wouldn't exactly appear in the query design grid; they'd appear as a list like this:

Addtables.png

 

If that table list doesn't appear visible, maybe it's opening somewhere towards the edge of the screen in such a way as to not be apparent to you.

 

It's possible to verify this by attempting to do some editing in the query grid immediately after clicking the "Add Tables" button. It opens as a modal, which will prevent you from clicking on any other object. Does that happen? 

 

It's also possible to add tables to an existing or new query by dragging them from the Navigation Pane into the top section of the query grid with other tables. Can you do that?

 

 

 

 

@George Hepworth Thank you for the help.  This is an old database and both the GUI and the tables were .mdb files.  I just converted those to .accdb files and I'm still unable to add tables to queries although now I'm getting a lot of "Run-time error '13' Type mismatch" errors on things like this...

 

Set mytable = db.OpenRecordset(sql)

or

Set rs = db.OpenRecordset(sql)

 

So that's a separate issue I'll be chasing down.  I'm not able to see the table list as you suggested trying to do.  I'm able to click anywhere because it does absolutely nothing when I click "show table."  The table list doesn't appear at all.  

The new issue with the Run-time error is solved.  I needed to change the priority level of the DAO object library to come above the ADO object library in the references.  I found that here: https://support.microsoft.com/en-us/help/181542/you-receive-a-type-mismatch-error-when-you-run-the-o...

 

However, I still can't add tables to queries.

@snowbdr 

 

Unfortunately, without being able to inspect this mdb, it's kind of hard to determine the possible problem.

On the chance that's it is related to something in that specific file itself, I'd next create a whole new accdb and import all of the existing objects from it. See if that clean file leaves behind whatever problems are impacting your ability to work.

@snowbdr Can you share you Office version/build/channel?  You should be able to see this information by choosing File/Account, and looking for 'About Access':

 

@snowbdr 

Have you tried just dragging and dropping tables from the main table list to the query window?

 

jchrisj_0-1599710740280.png

Cheers

 

Chris