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

Query a one to many table

Hello -
I need to run a report or query that returns a family record with
associated reason codes - as one record.
For instance: FamilyID -1800 has three reasons for needing service (SP,
WK, ED) - I want the result of the query or report to show>

1800,SP,WK,ED

all I can come up with, results like this: (three records)
1800,SP
1800,WK
1800,ED

Now some families may only have one reason - up to six reason (not
likely but...)

The basic tables look like this
[tFamily].[FamilyID]

[tFamilyReason].[FamilyID].[ReasonCode]
(of course the two tables are linked via familyID - in a one to many
relationship)
Appreciate the help-
thanks,
-john

Nov 13 '05 #1
2 3450
I had a similar situation a little while ago and was able to use the
following two modules as reference to solve the problem.

http://www.mvps.org/access/modules/mdl0008.htm

and you can also look at

http://www.mvps.org/access/modules/mdl0004.htm

One thing I noticed was the query was fairly processor intensive however I
was concatenating in some cases up to 18 records into one row which may have
been why.

Hope this helps.

Mike

<jo*****@zeus.kern.org> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hello -
I need to run a report or query that returns a family record with
associated reason codes - as one record.
For instance: FamilyID -1800 has three reasons for needing service (SP,
WK, ED) - I want the result of the query or report to show>

1800,SP,WK,ED

all I can come up with, results like this: (three records)
1800,SP
1800,WK
1800,ED

Now some families may only have one reason - up to six reason (not
likely but...)

The basic tables look like this
[tFamily].[FamilyID]

[tFamilyReason].[FamilyID].[ReasonCode]
(of course the two tables are linked via familyID - in a one to many
relationship)
Appreciate the help-
thanks,
-john

Nov 13 '05 #2
Excellent !

I tried mdl0004.htm - it worked perfect.
Exactly what I was looking to do. Pretty simple solution huh?? I would
have eventually wrote that same function.... NOT ! <smile> - wow

Thanks for your help,

john-


Big Time wrote:
I had a similar situation a little while ago and was able to use the
following two modules as reference to solve the problem.

http://www.mvps.org/access/modules/mdl0008.htm

and you can also look at

http://www.mvps.org/access/modules/mdl0004.htm

One thing I noticed was the query was fairly processor intensive however I was concatenating in some cases up to 18 records into one row which may have been why.

Hope this helps.

Mike

<jo*****@zeus.kern.org> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hello -
I need to run a report or query that returns a family record with
associated reason codes - as one record.
For instance: FamilyID -1800 has three reasons for needing service (SP, WK, ED) - I want the result of the query or report to show>

1800,SP,WK,ED

all I can come up with, results like this: (three records)
1800,SP
1800,WK
1800,ED

Now some families may only have one reason - up to six reason (not
likely but...)

The basic tables look like this
[tFamily].[FamilyID]

[tFamilyReason].[FamilyID].[ReasonCode]
(of course the two tables are linked via familyID - in a one to many relationship)
Appreciate the help-
thanks,
-john


Nov 13 '05 #3

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

Similar topics

5
by: jason | last post by:
I could sure use some conceptualization and query help with a Page Watch System I am building in Access 2000 and Asp. I need to cycle through databae and generate a compiliation query email that...
6
by: Steven D.Arnold | last post by:
I have a query which does not use column indexes that it should use. I have discovered some interesting behaviors of Postgres which may indicate a bug in the database's query planning. Take a...
4
by: sheree | last post by:
I have 3 tables (amoung a few others) in a small access database. The tables are as follows: == AEReport -------- AEID (PK) RptCatelog GCRCID PatientID EvntDate
8
by: Maxi | last post by:
There is a lotto system which picks 21 numbers every day out of 80 numbers. I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21) Here is the structure and sample data: ...
0
by: Michal Hlavac | last post by:
Hello, I have one main table and 2 many-to-many relation tables and 2 one-to-many relation table. Main table has 150 000 rows and many-to-many tables have about 300 000 rows. I am creating...
6
by: jjturon | last post by:
Can anyone help me?? I am trying to pass a Select Query variable to a table using Dlookup and return the value to same select query but to another field. Ex. SalesManID ...
4
by: Macroman | last post by:
MS Access XP, running on Win XP, Processor 2.4Ghz , 512Mb RAM, 40Gb Hard drive Table 1 has 167,000 records and contains the following fields tblone_custID tblone_easting tblone_northing ...
5
by: Wired Hosting News | last post by:
I tried to be breif and give a scenario so as not to be overlooked because it was soooo long. Let me give you real world. I am a manufacturer of goods and produce 11 items that are distributed...
6
by: OldBirdman | last post by:
I don't really know how to state this problem, as it doesn't make any sense to me. I have a simple "One-to-Many" query, and was updating the Many side. It quit working. I cannot make any changes...
9
by: Sinner | last post by:
Hi, I have a field name 'USER' in tableMAIN. How do I replace the user names with corresponding user names. I can do that in xl using vlookup but now I'm trying to find a way to do that in...
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: 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
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
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
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
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...

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.