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 / January 2005

Tip: Looking for answers? Try searching our database.

Dlookup not working properly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anthony Smith - 03 Jan 2005 17:44 GMT
Good Afternoon,

Happy, Safe & Blessed New Year to Everyone!

We have an Access 2003 application with SQL 2000 server on the backend. I
recently added another table into our SQL database and linked it into
Access. I'm trying to run a Dlookup statement to pull a price from the new
table based on the product id(part#) but it returns a null or empty field.
Can anyone advise? See below:

 Quo!UnitPrice = DLookup("[PECOCost]", "dbo_PartsDiscount", "[ProductID] ="
& [Quo]![ProductID])

I do not get an error message, it just doesn't return a value. Any ideas?
Thanks!

Sincerely,
Anthony Smith

In God We Trust!
JL - 03 Jan 2005 18:39 GMT
Hi Anthony,

If the field "ProductID" is defined as text field, then you have to put
quotes around them.

Quo!UnitPrice = DLookup("[PECOCost]", "dbo_PartsDiscount", "[ProductID] ='"
& [Quo]![ProductID] & "'")

> Good Afternoon,
>
[quoted text clipped - 16 lines]
>
> In God We Trust!
Anthony Smith - 03 Jan 2005 20:33 GMT
Yes it is a text field.  Thanks for the help, it works!  Have a blessed day!
> Hi Anthony,
>
[quoted text clipped - 28 lines]
>>
>> In God We Trust!
 
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.