Reserved Words Issue

B

blake7

Hi All,
I have a query which runs fine and returns what I want to see from a table
with columns using the words "Full" and "Function" which I did not realise
were reserved words in access. When i add a text box to a report with the
code DLookUp("Full Function","Year To Date Summary") it returns the #error
message in the text box, is there anyway around this problem so that I can
use these words? I really dont want to have to change all the database etc.
Thanks
 
X

XPS350

Hi All,
I have a query which runs fine and returns what I want to see from a table
with columns using the words "Full" and "Function" which I did not realise
were reserved words in access. When i add a text box to a report with the
code DLookUp("Full Function","Year To Date Summary") it returns the #error
message in the text box, is there anyway around this problem so that I can
use these words? I really dont want to have to change all the database etc.
Thanks

Try DLookUp("[Full Function]","[Year To Date Summary]")

Peter
http://access.xps350.com
 
G

Gina Whipp

Blake,

You didn't mention which version of Access... Access 2007 is especially
picky about Reserved Words. You could try using brackets...

DLookUp("[Full Function]","[Year To Date Summary]")

Food for thought... It should also be noted that your may not be a Reserved
Word issue as much as a *space in name(s)* issue. Any time you include you
spaces in your field names or object names you will need to use brackets.
This is why 99.9% of developers don't, ie: FullFunction,
YearToDateSummary... AND it's less to type. You could use the underscore,
ie Full_Function but then again still extra to type.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
A

Al Campagna

Blake,
"Full" and "Function" are not reserved words.
I think you have a syntax problem...

Try...
DLookUp("[Full Function]","Year To Date Summary")

That's why it's always best not to use spaces in Access names.
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
A

Al Campagna

Blake,
Drats! I speak with forked tounge...
That 2007 trips me up again!
Full and Function are reserved words in 2007.
But... when used together... [Full Function] it would not be.
Anyhoo... I'm sure it's the bracketing that's the problem...
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Al Campagna said:
Blake,
"Full" and "Function" are not reserved words.
I think you have a syntax problem...

Try...
DLookUp("[Full Function]","Year To Date Summary")

That's why it's always best not to use spaces in Access names.
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


blake7 said:
Hi All,
I have a query which runs fine and returns what I want to see from a
table
with columns using the words "Full" and "Function" which I did not
realise
were reserved words in access. When i add a text box to a report with the
code DLookUp("Full Function","Year To Date Summary") it returns the
#error
message in the text box, is there anyway around this problem so that I
can
use these words? I really dont want to have to change all the database
etc.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top