473,398 Members | 2,812 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,398 software developers and data experts.

Relationships & Database Design

Using Access 2003, I've built a simple database with some tables that are related to each other. I'm pretty new at using Access, so I've just discovered that when you have a one-to-many relationship, you can drill down to a related table by hitting a plus sign at the left of the record. (e.g. 'PickList' -> 'PickList Item').

Is there any way to duplicate this format on a report?

'PickList Item' needs to have a calculated column 'tblSupplies.Cost*tblPickListItem.Number Open'. I have the relationship between them as a many-to-one 'tblPickListItem'-to-'tblSupplies' so I can't drill down to the cost from table 'tblPickListItem'
May 13 '08 #1
3 1407
jeffstl
432 Expert 256MB
Using Access 2003, I've built a simple database with some tables that are related to each other. I'm pretty new at using Access, so I've just discovered that when you have a one-to-many relationship, you can drill down to a related table by hitting a plus sign at the left of the record. (e.g. 'PickList' -> 'PickList Item').

Is there any way to duplicate this format on a report?

'PickList Item' needs to have a calculated column 'tblSupplies.Cost*tblPickListItem.Number Open'. I have the relationship between them as a many-to-one 'tblPickListItem'-to-'tblSupplies' so I can't drill down to the cost from table 'tblPickListItem'
The reason relationships are built between tables is so that SQL can pull all related data with a single query.

What you describe happening in Access is a feature more then a "format" and its something that applications are typically built to feature rather then reports. (An application is an interactive report basically :)

However, you can get your report to display what you need using an SQL query tied to your report something like this:

Expand|Select|Wrap|Line Numbers
  1. SELECT (tblSupplies.Cost*tblPickListItem.Number) as MyNumber FROM MyTable, MySecondTable where tblPickListItem.Name = '" & MyParameter & "'
  2.  
May 13 '08 #2
The reason relationships are built between tables is so that SQL can pull all related data with a single query.

What you describe happening in Access is a feature more then a "format" and its something that applications are typically built to feature rather then reports. (An application is an interactive report basically :)
jeffstl,

Thanks! Your response got me thinking, and I was able to create something similar to what I wanted. I created a form with three listboxes that together specify one PickList. With a subform, I display the PickListItems that are related to that one PickList. Since it's in a form, I can easily add the calculated field. Using Listboxes instead of comboboxes let the users see what other options are available at each level of comparison.

I've been working on this all afternoon and it appears to work well. The only issue I can see is that users will have to choose their three criteria in series, but I don't see a way around that, except to create new forms.

minchazo
May 13 '08 #3
NeoPa
32,556 Expert Mod 16PB
...Is there any way to duplicate this format on a report?...
Linked tables are indeed easy to create queries on.

Any report can run from such a query as easily as from a table, so the simple answer is "Yes there is".
May 14 '08 #4

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

Similar topics

2
by: Deano | last post by:
Just had a minor mishap which has meant starting a new database and importing all objects. I did have the option to import relationships ticked but these have not come over. The prospect of...
6
by: GaryDave | last post by:
My school registration database has not been quite right after a recent compact and repair (done while I was away). Though most of the many forms and subforms are working normally, one form in...
7
by: davegb | last post by:
I'm totally new to relational database design. My boss has asked me to create a database of information on the employees in our group. Seemed to me like a simple application to learn the ropes. A...
1
by: Ray Watson | last post by:
ACCESS 2000 Just a quick note to leave for future developers. This problem has been well documented in previous posts, but this little trick may help future poor souls. The error is when you...
45
by: salad | last post by:
I'm curious about your opinion on setting relationships. When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. Over time I'd go into the window and see...
4
by: celinesuzzarini | last post by:
Hi all, I have split my database a while ago, and now, I want to add a table with relationships to other existing tables. I open the BE, create my table, and then go to the relationships...
5
by: Ron | last post by:
Hi All, Development stage of setting up a new solution here. I CONSTANTLY have to unhook the relationships I've built via the Relationships tab on Tools, then change the Required element of a...
1
by: cricket7 | last post by:
I think I figured out my tables and relationships. Tables: Table 1 tblTowedVehicles fldTowID fldReportDate fldReportTime fldlReportNumber
13
by: ARC | last post by:
Hello all, Prior to going live with my app, I have questions on relationships theory. My prior app was done in Access 97, and I did NOT use relationships at all. I have 65 tables in my...
1
FLEB
by: FLEB | last post by:
I'm working on a PHP/MySQL site with social networking and "message blast" functionality, and I'm not sure what the best method to represent multiple levels of interpersonal relationships in the...
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.