DLookups

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TyraWY

    DLookups

    Hi,
    I am trying to get a report to lookup certain fields from a table. I have
    different employees that work at different branches. I have made a table with
    the employees names and the branch they work at. I need for this to look and
    see that a certain employee works and a certain branch. It seems to be
    looking at the table but will only give me the first branch name on the table.

    example: I have an employee Amanda McFall and another one Joyce Reed. Amanda
    works at our East Branch but Joyce works at our Main Branch. Because Amanda
    is first in the table at East Branch this is the only branch I get for all
    employees.
    Here is what I have wrote:
    =DLookup("[BranchName]","TellerWeekly EmployeeBranch" ,"[Employee]=[Employee]")

    Any help would be great!]
    Thanks

  • paii, Ron

    #2
    Re: DLookups

    Where is the dlookup? If it in OnOpen, it will only run once. If it is
    OnFormat of the detail section, it will run once for each record.

    Why not link the branch table to the report's source query? It would be far
    faster then dlookup.

    "TyraWY" <u27848@uwewrot e in message news:67b76024f0 2ef@uwe...
    Hi,
    I am trying to get a report to lookup certain fields from a table. I have
    different employees that work at different branches. I have made a table
    with
    the employees names and the branch they work at. I need for this to look
    and
    see that a certain employee works and a certain branch. It seems to be
    looking at the table but will only give me the first branch name on the
    table.
    >
    example: I have an employee Amanda McFall and another one Joyce Reed.
    Amanda
    works at our East Branch but Joyce works at our Main Branch. Because
    Amanda
    is first in the table at East Branch this is the only branch I get for all
    employees.
    Here is what I have wrote:
    >
    =DLookup("[BranchName]","TellerWeekly EmployeeBranch" ,"[Employee]=[Employee]"
    )
    >
    Any help would be great!]
    Thanks
    >

    Comment

    • Arno R

      #3
      Re: DLookups


      "TyraWY" <u27848@uweschr eef in bericht news:67b76024f0 2ef@uwe...
      Hi,
      I am trying to get a report to lookup certain fields from a table. I have
      different employees that work at different branches. I have made a table with
      the employees names and the branch they work at. I need for this to look and
      see that a certain employee works and a certain branch. It seems to be
      looking at the table but will only give me the first branch name on the table.

      example: I have an employee Amanda McFall and another one Joyce Reed. Amanda
      works at our East Branch but Joyce works at our Main Branch. Because Amanda
      is first in the table at East Branch this is the only branch I get for all
      employees.
      Here is what I have wrote:
      =DLookup("[BranchName]","TellerWeekly EmployeeBranch" ,"[Employee]=[Employee]")

      Any help would be great!]
      Thanks
      Maybe "[Employee]=[Employee]" is confusng Access?
      This is always true so Access gives you the first matching record.

      I guess you need:
      =DLookup("[BranchName]","TellerWeekly EmployeeBranch" ,"[Employee]=" & Me![Employee])

      Arno R

      Comment

      Working...