Simple query question: setting a field to a set value (1 Viewer)

DarkAngel

Registered User.
Local time
Today, 15:51
Joined
Jul 3, 2007
Messages
21
Putting this in the field box in a query:

read or write: "r"

should create a field called read or write with a value of r in each record in the query, shouldn't it?

Why doesn't it, and how can I make it work?

Cheers,
Paul
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:51
Joined
Feb 28, 2001
Messages
27,384
Just for giggles, check the SQL design view.

To get the effect you want, you should have something similar to

SELECT ...., ...., "r" AS [Read Or Write], ... etc etc etc

You need the [] because Access doesn't like blanks in field names in some cases and keywords in the name probably confused the crud out of the SQL parser. ALL THREE of those words are keywords to Access, so you gave it a triple doozy with a name like that.
 
Last edited:

DarkAngel

Registered User.
Local time
Today, 15:51
Joined
Jul 3, 2007
Messages
21
For some reason changing the AS to [read or write read only] and expanding the other set of fields (and removing a conflicting one) worked :)

Oh and the [ ] probably helped as well!

Thanks
 

Users who are viewing this thread

Top Bottom