Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

DLookUp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DS - 31 May 2008 15:58 GMT
I have a DLookUp problem I think it's in the Format part.  It returns an
#Error message.
Thanks
DS

=DLookUp("Format([ConcernPCTStart],'#%') & "" To""' &
Format([ConcernPctEnd],'#%')","tblConcern","ConcernID=0")
Daniel Pineault - 31 May 2008 18:27 GMT
You're trying to pull 2 fields value if I read your Dlookup properly.

=DLookUp("Format([ConcernPCTStart],'#%') & "" To""' &
Format([ConcernPctEnd],'#%')","tblConcern","ConcernID=0")

According to the help file: "use the DLookup function to get the value of a
particular field", as such it cannot do what you are wanting.  Instead you'll
need to perform a Dllokup for each field and then concatenate them
separately.  Also your format function should be outside the Dlookup.

sStart=Format(DLookUp("ConcernPCTStart]","tblConcern","ConcernID=0"), '#%')
sEnd=Format(DLookUp("[ConcernPCTStart]","tblConcern","ConcernID=0") ,'#%')

MsgBox sStart & " To" & sEnd

You might also want to take a look at http://allenbrowne.com/ser-42.html as
an alternative to Dlookup
Signature

Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.com/index.php
Please rate this post using the vote buttons if it was helpful.

> I have a DLookUp problem I think it's in the Format part.  It returns an
> #Error message.
[quoted text clipped - 3 lines]
> =DLookUp("Format([ConcernPCTStart],'#%') & "" To""' &
> Format([ConcernPctEnd],'#%')","tblConcern","ConcernID=0")
DS - 31 May 2008 19:24 GMT
OK, Great that works!
Thnaks
DS
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.