473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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]","TellerWeeklyEmployeeBranch","[Employee]=[Employee]")

Any help would be great!]
Thanks

Oct 13 '06 #1
2 2330
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@uwewrote in message news:67b76024f02ef@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]","TellerWeeklyEmployeeBranch","[Employee]=[Employee]"
)
>
Any help would be great!]
Thanks

Oct 13 '06 #2

"TyraWY" <u27848@uweschreef in bericht news:67b76024f02ef@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]","TellerWeeklyEmployeeBranch","[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]","TellerWeeklyEmployeeBranch","[Employee]=" & Me![Employee])

Arno R
Oct 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Kalvin Schroder | last post by:
I am fairly new to Access, and am trying to put together an invoice form. The main form in called InvoiceDetailFm. Source is the table InvoiceDetail and has invoice number, saleman, and CustID as...
3
by: RWC | last post by:
Hello, I have an issue that's driving me batty! I have a report, whose record source is SQL based on a normalized set of tables. There are no nested queries and no dlookups in this record...
10
by: MLH | last post by:
Anybody know why I might be getting error #2109 during the procedure below? It does not occur on 2 desktops, but did on a laptop. The error said: "The following unexpected error occurred in Sub...
11
by: sara | last post by:
I am trying my first functions in my code. I have a set of queries that runs to create temp tables with the right data for some reports. They can run for a long time, so I want the user to know...
6
by: Ron | last post by:
Hi All, Was just wondering which is faster, a subreport or dlookup. I've got a report with either 5 subreports or lots of dlookups. The subreports generally have anywhere from 5 to 12...
12
by: Dixie | last post by:
Is there a way to shell to Microsoft Word from Access and load a specific template - using VBA? dixie
1
by: dmeyr | last post by:
Hello, I am new to Access and am having difficulty with a Dlookup function. I have a form that I wish to autopopulate 10 fields with values based on two criteria which are also fields on the form....
18
by: njgreen2001 | last post by:
I thought the length of this might give me problems. Any suggestions on how to shorten it? Expression: =IIf(="A Pos" And ="A Pos",(DLookUp("","")), IIf(="A Pos" And ="A...
7
by: clloyd | last post by:
I am trying to generate an email that is gathering information from two different tables. I keep getting an error message that it can not find my CustomerNo. Does anyone have any ideas? Private...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.