select query invalid bracketing of name

B Caple

New Member
Joined
May 9, 2002
Messages
6
In making a select query in Access97, I am pasting field references from the list in the build box (adding several fields), but when I go to view the query it errors with "Invalid bracketing of name '...' The field name shown is correct and the bracketing is as added by the build box, such as [table.field]. Any suggestions?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
That is not the correct way to bracket a field. It should be:
![field]

I don't know how the older versions of Access do it, but mine (2002) allows me to select the fields from the build box (click on tables, select table, click on field). This is nice because then I know that it will always work.

HTH
 
Upvote 0
Thanks, you are correct that when using the build window and pasting fields from tables it does bracket as
![field]; but if you paste fields from the query itself they come in as [table.field].
I pasted from the tables list and it did work.
Incidentally, I pasted or built another expression from the query fields and it did work and was in the form [table.field].
Strange?
 
Upvote 0
Yes, very strange. There may be some inconsistencies, especially with older versions.

I often run into trouble when writing code on when to use a "period" and when to use an "exclamation point". I like having the option to select them instead of typing them. It greatly reduces my errors and headaches!
 
Upvote 0

Forum statistics

Threads
1,221,503
Messages
6,160,195
Members
451,630
Latest member
zxhathust

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top