Syntax Question...

  • Thread starter Thread starter Dale Lundgren
  • Start date Start date
D

Dale Lundgren

Hi All-

I'm a bit confused by some of the syntax using Access & VBA. For some
reason I can't seem to find a clear explanation in Help. Could someone
please clarify what the brackets, exclamation & period do IE:

I got this to work after much tinkering:

SELECT [Walls].[WallID], [Walls].[WallName] FROM Walls WHERE
[Walls].[ProjectID]=[Forms]![Projects].[cboProjectBrowse];

Why does "[Walls].[WallID]" need to be in brackets yet "Walls" after the
FROM statement is not?

Thank you!

Dale Lundgren
 
In most contexts (including VBA and SQL), the square brackets are only
needed around names that contain strange characters (such as space or #) or
do not begin with a letter.

In other contexts (Control Source of a text box, in a macro, in the query
design window, ...) Access adds the square brackets automatically.

The delimiter square brackets are always permissible, but are a pain to type
all the time.
 
Back
Top