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

Missing data on report from table that uses combobox Access 97

Looking for some help. I have a SUPPLIER table that has an ID code and supplier name. In another table, PARTS, I allow up to 3 suppliers per part. I use a combobox to allow only the supplier name to be selected. When I open the PARTS table or run a query against it, the data looks fine( part name and supplier names). When I create a report from the parts table I only get the supplier ID and not the name. I cannot figure out how to get the supplier name.

Thanks.
Jan 16 '07 #1
8 1752
nico5038
3,080 Expert 2GB
You'll have to create a query with the PARTS tabel and three times the SUPPLIER table.
Now drag and drop Supplier1 to the first table, Supplier2 to the second table, etc

OPlace now the names from each of the SUPPLIER tables in the query and use that query for your report.

Nic;o)
Jan 17 '07 #2
Nic, thanks for the reply. Sometimes things click and I understand but this is not the case.

Supplier Table ID Name
001 Bob
002 Ted
003 Brad
004 Tony
005 John
Parts Table Part Sup1 Sup2 Sup3( can have 3 suppliers for any 1 part)
Seal Ted Brad John

The suppliers in the Parts table are selected from a combobox that is linked to the Supplier table. When I ran the report against the parts table I got:
Part Name Seal Sup1 002 Sup2 003 Sup3 005
I was looking for:
Part Name Seal Sup1 Ted Sup2 Brad Sup3 John

How can I establish a link back to the Supplier table to "resolve" the name in the report? I can post additional info if required. Any alternate suggestions on approaches?

This needs to be a "programmable" solution as the parts list will grow and change.

Thanks,
Bryan
Jan 17 '07 #3
nico5038
3,080 Expert 2GB
Hmm, your Q looked like you couldn't get the names of all three :-)
You're paying here the price for not normalizing your data properly.
You should have created a separate PartsSupplier table with the key from both tables. The advantage is that you can even add more than 3 suppliers when needed :-)

To make it work in this situation you'll have to create a UNION query like:

select partid, supplier1 as supplier from tbl parts
UNION
select partid, supplier2 as supplier from tbl parts
UNION
select partid, supplier3 as supplier from tbl parts;

Now you'll get the possibility to select all rows from the same supplier by basing your report on this query.

Clearer ?

Nic;o)
Jan 17 '07 #4
Much clearer. Was thinking along those lines but I could not formulate the syntax Spent a few years immersed in DB2 and I tend to think in those terms for SQL and it makes things difficult at times. Very interested in your suggestion about the table.
I could not think of a way to include the supplier code(key) along with the name when I used the combo box to add the information into the parts table. The parts table has an Autonumber key but it has not reference to the supplier table. Can you point me towards an example of this technique?

Thanks,

Bryan
Jan 17 '07 #5
I was hoping to include an image or copied text in my note but I do not see any copy/ paste option that are available. I guess that I could put the material in a Word doc and attach that. Would that be of any use or interest to you?

Bryan
Jan 17 '07 #6
nico5038
3,080 Expert 2GB
The normalize way would have three tabels:

Parts:
PartID Description

Supplier
SupplierID SupplierName

PartsSupplier
PartID SupplierID

This way you can use a JOIN of the three tables to get all information in one row.

For the UNION query you can use also a JOIN to include the name like:

Select A.PartID, B.SupplierName from Parts A INNER JOIN Supplier B ON A.Supplier1 = B.SupplierID
UNION
Select A.PartID, B.SupplierName from Parts A INNER JOIN Supplier B ON A.Supplier2 = B.SupplierID
UNION
Select A.PartID, B.SupplierName from Parts A INNER JOIN Supplier B ON A.Supplier3 = B.SupplierID

No need to put it in Word, guess I got the view :-)

Nic;o)
Jan 17 '07 #7
Nic:
Many thanks. The re-structure of the tables worked out just fine and reduced
the report query complexity. Results as wanted.

Best Regards,

Bryan
Jan 17 '07 #8
nico5038
3,080 Expert 2GB
Glad I could help and success with your application !

Nic;o)
Jan 17 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5...
4
by: CSDunn | last post by:
Hello, I have a combo box (Combo7) that needs to call a function during the After Update event of the combo box. The function resides in an Access 2000 ADP Module called MMAnswerData_code. The...
3
by: Nicolae Fieraru | last post by:
Hi All, I have a problem and I can't figure out how to solve it. My database has three tables: tblCustomers, with CustomerId and CustomerName tblProducts, with ProductId and ProductCode...
8
by: Jerry | last post by:
I have an off-the-shelf app that uses an Access database as its backend. One of the tables contains a field with an "OLE Object" datatype. I'm writing some reports against this database, and I...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
12
by: Beany | last post by:
hi, i have a form that has two buttons...................... one button opens a form with a combobox.............. this combobox has a list of usernames(from the table)........ When selecting a...
5
by: soccery387 | last post by:
Hi, I am very much a beginner to Access, but learn software very quickly. I made a simple project with a table, a form to enter the data and a report to view/print the data. I added all the data...
11
by: billa856 | last post by:
Hi, I have project in MS Access.In that I have one form in which there is one combobox .I want to know when I select an item from that combobox and click on submit button then it should open a...
1
by: Maria DiGiano | last post by:
I am using Access to organize data from a survey which uses a Likert scale to measure response- the scale is 3 points- "I agree", "I don't know" and "I disagree". The numerical value of each...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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.