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 / New Users / April 2006

Tip: Looking for answers? Try searching our database.

DLookUp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ldmcfall - 13 Apr 2006 23:31 GMT
Hi, I am having a problem with my DLookup on my report. I have a table that
is BranchName1 and the fields in this table are Station and BranchName. In
this table it tells me which teller has done a transaction by knowing that a
certain station number belongs to a certain branch. For example: if the
station number is 1234 that is a teller at our main branch, if it is 1356 it
is a teller at our East branch. On my report I need to look up this
information in the table so that it will put the right Branch Name on the
report depending on the Station.  This is what I have wrote:
=DLookUp("[BranchName]","BranchName1","[Station]=[Station]").

On my report it seems to be going to the table but the only branch it will
give me is Main Branch no matter what the station number is.  There are four
branches I need, Main Branch, East Branch, Saratoga, and Hanna.
Any Help would be great.
Thanks.
Jeff Boyce - 14 Apr 2006 00:12 GMT
It sounds like you've decided that using DLookup() is your solution.

If you create a query, add the Transaction table and the BranchName1 table,
joined on [Station], you can include [BranchName] as one of your output
fields.

Then, base your report on the query, not the table.

Regards

Jeff Boyce
Microsoft Office/Access MVP

> Hi, I am having a problem with my DLookup on my report. I have a table
> that
[quoted text clipped - 15 lines]
> Any Help would be great.
> Thanks.
Van T. Dinh - 14 Apr 2006 00:22 GMT
Usually, the problem is in the citeria:

   "[Station]=[Station]"

The first [Station] correctly refers to the Field name in the Table / Domain
and should be enclosed by double-quote.  The second [Station] normally
refers to a Field (?) VALUE that needs to be supplied to the DLookUp()
function to find a matching Record.  If this is the case, it needs to be
outside the double-quotes.

Assume that [Station] is numeric and included in the RecordSource of your
Report, you can try:

=DLookUp("[BranchName]","BranchName1","[Station] = " & [Station])

Alternatively, you can include the Table "BranchName1 in the RecordSource of
the Report joined properly to other Tables in the RecordSource to idetify
the BranchName required, include BranchName in the selection list and in
this case, BranchName value will be available to the Report like other
Fields.

Signature

HTH
Van T. Dinh
MVP (Access)

> Hi, I am having a problem with my DLookup on my report. I have a table
> that
[quoted text clipped - 15 lines]
> Any Help would be great.
> Thanks.
Duane Hookom - 14 Apr 2006 01:38 GMT
Van,
Good to see you back posting.

Signature

Duane Hookom
MS Access MVP

> Usually, the problem is in the citeria:
>
[quoted text clipped - 38 lines]
>> Any Help would be great.
>> Thanks.
Van T. Dinh - 14 Apr 2006 02:29 GMT
Thanks, Duane.

For a while, I thought I would not be back posting.

Signature

Cheers
Van

> Van,
> Good to see you back posting.
Jeff Boyce - 14 Apr 2006 16:16 GMT
Welcome back, Van!

Jeff

> Usually, the problem is in the citeria:
>
[quoted text clipped - 38 lines]
>> Any Help would be great.
>> Thanks.
Van T. Dinh - 14 Apr 2006 23:24 GMT
Thanks, Jeff

Signature

Van

> Welcome back, Van!
>
> Jeff
 
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.