Workaround table with spaces in column names (1 Viewer)

nfk

Registered User.
Local time
Today, 14:40
Joined
Sep 11, 2014
Messages
118
Hi,

I got a query on Access 2010 that keeps popping up a window asking for a parameter, I'm guessing is because the brilliant developer thought I would be a good idea to use spaces on the column names:

Code:
SELECT 
0 AS timetable,
Switch(
LOCATION = "WEST", 1,
LOCATION = "CENTRE", 2,
LOCATION = "EAST", 3,
LOCATION = "NORTH", 4,
LOCATION = NULL, 5
) AS location,
[VEHICLE NAME] AS title,
[VEHICLE TYPE] AS subtitle,
[EST TIME IN] AS start,
[EST TIME OUT] AS end,
[DATE IN] AS start_date,
[DATE OUT] AS end_date,
CUSTOMER_NAME AS description

FROM [VEHICLE BOOKINGS TABLE]

WHERE LOCATION > "";

When trying to display as results table it would ask you for parameter [VEHICLE NAME], whats weird is that its only that parameter thats asking when there's more column titles between brackets on the query.

Any ideas?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 16:40
Joined
Feb 28, 2001
Messages
27,328
This always occurs when there is a spelling difference between what was declared and what was referenced. I would consider checking that you don't have an extra space in the reference (or in the table definition).

If you had a way to do it, I would also SERIOUSLY consider editing that dog ASAP to get rid of the spaces, but that's just me.
 

jdraw

Super Moderator
Staff member
Local time
Today, 17:40
Joined
Jan 23, 2006
Messages
15,394
I agree with TheDocMan. It might be helpful to show the table design for
[VEHICLE BOOKINGS TABLE].
 

Users who are viewing this thread

Top Bottom