473,378 Members | 1,475 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,378 software developers and data experts.

Reports - Lookup Values

I am creating a report where I have a Unique identifier for each
customer. ie 1, 2, 3 etc. The Customer has a name of Joe, Mary, Fred
etc. The customers details all come from the one table and some of
the customers have partners which are also customers in their own
right and have the unique identifiers. For examaple: Fred is
customer 1 who has a partner, Mary, who is customer 23. On my report
I have the customers details in Customer Number Order and I also have
their partners name in the report for each record.

What I am trying to achieve is to put the Partner's customer number
along side the Parnters Name for the Primary customer. For example:

Cust No. Name Partners Name Partner's Cust No.
1 Fred Mary 23

I guess it is like the VLOOKUP on excel but I am not able to achieve
it in Access.

Any help with this would be greatly appreciated.

Regards
Steve
Nov 12 '05 #1
1 3854
Steve,

You could create a query with a self-join, but how depends on your
table-structure. Just first names as a reference-key have a big risk
of duplicate values. The most sensible solution is to enter customer
and partner as separate records with a ID-reference (partnetr-ID) when
applicable. When you want customers and partners together you can
create a query using the same table twice and making a connection
between the partner-id of the first to the id of the 2nd. The relation
should be changed to always cointain the client if no parner exists.
Then you can select the names and ID's of both partners in one row
together. If the partner-id is registered at both records you could
filter out doubles (in reverse order) by a clause like 'where
partner.partner_id is null or (partner.partner_id = clustomer.id and
clustomr.id < partner.id)'
In that case you check that a circular reference is there and in that
case present only the first entered customer.

Marc
st********@wn.com.au (Steve P) wrote in message news:<36*************************@posting.google.c om>...
I am creating a report where I have a Unique identifier for each
customer. ie 1, 2, 3 etc. The Customer has a name of Joe, Mary, Fred
etc. The customers details all come from the one table and some of
the customers have partners which are also customers in their own
right and have the unique identifiers. For examaple: Fred is
customer 1 who has a partner, Mary, who is customer 23. On my report
I have the customers details in Customer Number Order and I also have
their partners name in the report for each record.

What I am trying to achieve is to put the Partner's customer number
along side the Parnters Name for the Primary customer. For example:

Cust No. Name Partners Name Partner's Cust No.
1 Fred Mary 23

I guess it is like the VLOOKUP on excel but I am not able to achieve
it in Access.

Any help with this would be greatly appreciated.

Regards
Steve

Nov 12 '05 #2

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

Similar topics

2
by: CoreyWhite | last post by:
The future of computer architecture will use lookup tables. Currently computer processor speed outweighs the benefits of using computer memory for lookup tables, except in some cases. As computer...
3
by: Tripp Knightly | last post by:
I have a lookup table from which I want to categorize various bands of customer net income. Some of the income is positive, some is negative. The bands vary in size (ie, <500, -200 to 0, 100 to...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
4
by: Vik | last post by:
How can I display the lookup values in a datagrid? E.g., the datagrid displays a table that contains a ProductID field. I want to display a Product description from a Product table in that...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
0
by: dbuchanan | last post by:
Hello, For my datagrid I added a datagrid table style to include columns from my lookup tables. These display the values in the lookup tables rather than just the integer key value stored in the...
3
by: dbuchanan | last post by:
Hello, (Windows forms - SQL Server) I fill my datagrid with a stored procedure that includes relationships to lookup tables so that users can see the values of the combobox selections rather...
3
by: john | last post by:
In my form (table A) I have subform (table B (only 2 fieds: ID and App_name) where table A -Table B are linked 1XM. To be able to add a record in the subform I want to use a lookup form since the...
0
by: TB | last post by:
Hi there, To make data capturing a bit easier for myself, on one of the fields i decided to use a lookup value list to insert some common values in a certain field of a record. My database...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.