Is the join expression not supported by MS Access?

calendar_today Asked Mar 16, 2009
thumb_up 8 upvotes
history Updated April 14, 2026

Direct Answer

You are mixing a join statement with "classical joins" (a comma separated list of tables with conditions in the where statement), which I believe is not allowed. Change the query…. This is a prose walkthrough, ranked #44th of 67 by community upvote score, from 2009.


The Problem (Q-score 4, ranked #44th of 67 in the Access VBA archive)

The scenario as originally posted in 2009

Can anyone explain to me what is wrong with my query?

SELECT T2.TIPOPRODUTO
    , T2.PRODUTO
    , T1.ESPESSURA
    , '' AS LARGURA
    , '' AS COMPRIMENTO
    , '' AS [ACABAM REVEST]
    , '' AS [ESPECIF QUALIDADE]
    , T1.CÓDIGORASTREABILIDADE
    , T3.DATA
    , T4.NOMEFANTASIA
    , T7.NOME
    , T5.DT_INICIO_RESERVA
    , T1.PESO
    , T5.DT_FIM_RESERVA
    , '' AS DESTINO
    , T3.OBSERVAÇÃO
    , '' AS [CUSTO TOTAL]
FROM ([TABELA DE PRODUTOS/ESTOQUE] LEFT OUTER JOIN [TABELA DE PRODUTOS] ON ([TABELA DE PRODUTOS/ESTOQUE].PRODUTO=[TABELA DE PRODUTOS].ID))
, [TABELA DE PRODUTOS/ESTOQUE ] AS T1
    , [TABELA DE PRODUTOS] AS T2
    , [TABELA DE MOVIMENTAÇÃO DE ESTOQUE] AS T3
    , [TABELA DE FORNECEDORES] AS T4
    , RESERVAS_PRODUTOS_ESTOQUE AS T5
, [TABELA DE MOVIMENTAÇÃO DE PRODUTOS/ESTOQUE] AS T6
    , [TABELA DE USUÁRIOS] AS T7
    , [TABELA DE PEDIDOS DE COMPRA] AS T8
WHERE (((T1.Produto)=[T2].[ID]) 
    AND ((T1.ID)=[T5].[ID_PRODUTO_ESTOQUE]) 
    AND ((T5.id_vendedor)=[T7].[ID]) 
    AND ((T3.ID)=[T6].[ID]) 
    AND ((T2.ID)=[T6].[PRODUTO]) 
    AND ((T4.ID)=[T8].[FORNECEDOR]) 
    AND ((T8.Comprador)=[T7].[ID]));

My best guess is it fails on this line:

([TABELA DE PRODUTOS/ESTOQUE] LEFT OUTER JOIN [TABELA DE PRODUTOS] ON ([TABELA DE PRODUTOS/ESTOQUE].PRODUTO=[TABELA DE PRODUTOS].ID))

Why community consensus is tight on this one

Across 67 Access VBA entries in the archive, the accepted answer here holds niche answer (below median) status — meaning voters are unusually aligned on the right fix.


The Verified Solution — niche answer (below median) (+8)

Verbal answer — walkthrough without a code block

Note: the verified answer is a prose walkthrough. If you need a runnable sample, check Access VBA entries ranked in the top 10 of the same archive.

You are mixing a join statement with “classical joins” (a comma separated list of tables with conditions in the where statement), which I believe is not allowed.

Change the query to use only join statements. In Access you have to pair the joins using parentheses, in this manner:

from (((t1 join t2 on ...) join t3 on ...) join t4 on ...)


When to Use It — vintage (14+ years old, pre-2013)

Ranked #44th in its category — specialized fit

This pattern sits in the 74% tail relative to the top answer. Reach for it when your scenario closely matches the question title; otherwise browse the Access VBA archive for a higher-consensus alternative.

What changed between 2009 and 2026

The answer is 17 years old. The Access VBA object model has been stable across Office 2013, 2016, 2019, 2021, 365, and 2024/2026 LTSC, so the pattern still compiles. Changes that might affect you: 64-bit API declarations (use PtrSafe), blocked macros in downloaded files (Mark-of-the-Web), and the shift toward Office Scripts for web-first workflows.

help
Frequently Asked Questions

This is a below-median answer — when does it still fit?
expand_more

Answer score +8 vs the Access VBA archive median ~4; this entry is niche. The score plus 4 supporting upvotes on the question itself (+4) means the asker and 7 subsequent voters all validated the approach.

The answer has no code block — how do I turn it into a snippet?
expand_more

Use the walkthrough above as a checklist, then open a top-10 Access VBA archive entry for a concrete starting template you can adapt.

This answer is 17 years old. Is it still relevant in 2026?
expand_more

Published 2009, which is 17 year(s) before today’s Office 2026 build. The Access VBA object model has had no breaking changes in that window. Three things to re-test: (1) blocked macros on downloaded files (Mark-of-the-Web), (2) 64-bit API declarations (PtrSafe, LongPtr), (3) any shift toward Office Scripts for web scenarios.

Which Access VBA pattern ranks just above this one at #43?
expand_more

The pattern one rank above is “No read permission on MSysObject error”. If your use case overlaps, compare both before committing.

Data source: Community-verified Q&A snapshot. Q-score 4, Answer-score 8, original post 2009, ranked #44th of 67 in the Access VBA archive. Last regenerated April 14, 2026.