dbTalk Databases Forums  

What is wrong with this Dlookup Statement

comp.databases.ms-access comp.databases.ms-access


Discuss What is wrong with this Dlookup Statement in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
musicloverlch
 
Posts: n/a

Default What is wrong with this Dlookup Statement - 03-10-2010 , 10:31 AM






I have re-written this stupid dlookup a million times and it always
says #Error and I am going crazy. Please help.

I have an Integer field called FileID that I am trying to lookup on
the Fax Center table from SharePoint (linked in Access). I want to
return the field "URL Path" from the Fax Center table.

Here is what I have

Dlookup("URL Path","Fax Center",ID = " & [FileID])

(The primary key on the SharePoint Fax Center Table is called "ID". I
can't change it.)

Please tell me what is wrong.

Thanks,
Laura

Reply With Quote
  #2  
Old   
musicloverlch
 
Posts: n/a

Default Re: What is wrong with this Dlookup Statement - 03-10-2010 , 10:39 AM






Never mind. I figured it out. I needed brackets around [URL Path].

I don't put spaces in my filed names so I'm not used to checking for
that.


On Mar 10, 10:31*am, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Quote:
I have re-written this stupid dlookup a million times and it always
says #Error and I am going crazy. Please help.

I have an Integer field called FileID that I am trying to lookup on
the Fax Center table from SharePoint (linked in Access). *I want to
return the field "URL Path" from the Fax Center table.

Here is what I have

Dlookup("URL Path","Fax Center",ID = " & [FileID])

(The primary key on the SharePoint Fax Center Table is called "ID". *I
can't change it.)

Please tell me what is wrong.

Thanks,
Laura

Reply With Quote
  #3  
Old   
fredg
 
Posts: n/a

Default Re: What is wrong with this Dlookup Statement - 03-10-2010 , 10:44 AM



On Wed, 10 Mar 2010 08:31:15 -0800 (PST), musicloverlch wrote:

Quote:
I have re-written this stupid dlookup a million times and it always
says #Error and I am going crazy. Please help.

I have an Integer field called FileID that I am trying to lookup on
the Fax Center table from SharePoint (linked in Access). I want to
return the field "URL Path" from the Fax Center table.

Here is what I have

Dlookup("URL Path","Fax Center",ID = " & [FileID])

(The primary key on the SharePoint Fax Center Table is called "ID". I
can't change it.)

Please tell me what is wrong.

Thanks,
Laura
Field names that include spaces "must" be enclosed within brackets,
i.e. [URL Path] not URL Path.
Also you did not place a " before ID = "

= Dlookup("[URL Path]","[Fax Center]","[ID] = " & [FileID])

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.