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

Duplicate records in a main form when there are multiple subform records

Hello,

I have been struggling with this for a while. I am working on a rather simple database for claims in Access 2003. I have a table called claims that has a primary key field called Claim #. It is linked to a table called parts. The idea is that a claim can be filed for multiple damaged parts. In other words a claim # could have 0 to several damaged parts. My problem lies with the form that I have created. It is a main form with a subform for the list of parts that were damaged. When a claim has more than one part listed in the subform Access gives me back a record in the main form for each part listed in it's subform.

So if Claim #123 has three parts listed in the subform Access will give me three records (in the main form) for Claim #123. I have tried several things to get it return only one record but so far I have come up empty.

I hope this makes sense. I tried to find this issue in the forum but couldn't. Any help would be greatly appreciated.

Thanks
Jun 8 '07 #1
6 5986
Hello All,

I'm bumping this because I'm ready to pull my hair out. I know there must be an easy fix and I'm just missing it (or I'm a complete moron)

Any help would make my day.

Thanks
Jun 12 '07 #2
FishVal
2,653 Expert 2GB
Hello,

I have been struggling with this for a while. I am working on a rather simple database for claims in Access 2003. I have a table called claims that has a primary key field called Claim #. It is linked to a table called parts. The idea is that a claim can be filed for multiple damaged parts. In other words a claim # could have 0 to several damaged parts. My problem lies with the form that I have created. It is a main form with a subform for the list of parts that were damaged. When a claim has more than one part listed in the subform Access gives me back a record in the main form for each part listed in it's subform.

So if Claim #123 has three parts listed in the subform Access will give me three records (in the main form) for Claim #123. I have tried several things to get it return only one record but so far I have come up empty.

I hope this makes sense. I tried to find this issue in the forum but couldn't. Any help would be greatly appreciated.

Thanks
Hi!

It seems to me that the main form RecordSource property refers to tables join.
To help you I need to know what is the Record Source of your main form.
Jun 13 '07 #3
Hi!

It seems to me that the main form RecordSource property refers to tables join.
To help you I need to know what is the Record Source of your main form.

The record source for the main form is a query that includes the two tables in question joined in a one to many relationship by the "claim number". The claim number is a key field in the table on the one side and it linked to "Claim Number" on the many side. There are two other tables linked to the claim table as well but by different fields.

Please let me know if you need more info. I'm pretty new to this and I'm getting pretty frustrated.

Thanks so much for your help.
Jun 14 '07 #4
FishVal
2,653 Expert 2GB
The record source for the main form is a query that includes the two tables in question joined in a one to many relationship by the "claim number". The claim number is a key field in the table on the one side and it linked to "Claim Number" on the many side. There are two other tables linked to the claim table as well but by different fields.

Please let me know if you need more info. I'm pretty new to this and I'm getting pretty frustrated.

Thanks so much for your help.
Hi!

Get rid of this join.
You main form RecordSource should be table Claims, subform RecordSource should be table Parts, link master/child fields ClaimNumber.
Jun 14 '07 #5
Hi!

Get rid of this join.
You main form RecordSource should be table Claims, subform RecordSource should be table Parts, link master/child fields ClaimNumber.


That's fantastic!! I knew it would be something easy like that. However, by changing the record source for the main form from a query to the claims table it has created another issue. As I mentioned above the query had two additional tables linked to the claim table. One of them is the Plant Table. The idea was that I could enter the Plant # on the main form and it would automatically populate the plant address. The other linked table was to operate in the same way. Now the Plant number still appears but the address fields all show "#Name?"

Is there something I can do about this?

I can't thank you enough for the help. It looks like I'll get to keep my job for at least another week.
Jun 15 '07 #6
HI,

Never mind my last question. I've figured it out on my own. I set the record source for the main form to a query that DID NOT include the part table but did include the plant and carrier table. Now everything populates automatically and I only get one record per claim number.

This has been a good Friday...so far.

FishVAl, thank you so much for the help.
Jun 15 '07 #7

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

Similar topics

9
by: Catherine Jo Morgan | last post by:
Can I set it up so that a certain combination of fields can't contain the same entries, on another record? e.g. a combination of FirstName/LastName/address? Or FirstName/LastName/phone? Or...
6
by: 6thirty | last post by:
Hi, I've created a stocktaking database using Access XP. This is indexed by two fields - part number and shelf location. I am currently inputting all the data via a form. When I have entered a...
1
by: Charles Ledbetter | last post by:
I'm missing the mistake. I have a MainForm called frmResources. I have a Second Form and related table called frmFootnotes. I am trying to use it as a subform to the main form appearing in a...
2
by: mavmavv | last post by:
I have a Form where I have created a duplicate record button, no problem... The subform is where my problem lies. The subform displays data matching the mainform's ID, these two values are...
0
by: claus | last post by:
Hi, I am not a programmer but tries anyway to program a feature in a form where I am able to copy entries for the form and a subform. I have tried follow the guide here...
0
by: jwbird | last post by:
I have a main form with multiple Subforms that are all displaying Datasheet information related to the Main form record. When I make changes/adds to the records(s) in the subform and tab to another...
1
by: VinArt | last post by:
MS Acc 2003, XP Thank you in advance for any help. I have tables called "Makeup" and "Lines". Each makeup can have multiple lines. Goal is to create a new "makeup" with identical "lines"...
3
by: 6afraidbecause789 | last post by:
Kudos to anyone who can explain this one--how to duplicate a group of continuous records in a subform for use in a new subform PK ID. The 2 entry fields (combo boxes) in the subform are RoleID and...
1
by: xraive | last post by:
I have a problem with this. Currently I am trying Allen's code and i am not successful. Current Design Table1 (Main Form) TravelID (PK) ApprovedBY EntreredBy BudgetCode ExpenseCode
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
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
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.