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

No duplicates

3
I have a parent table, a join and another parent. Not sure this is right.

first parent is a Products table, the second parent is a projects table. Then there is the join table.

tblProductProjectJoin has
ProductProjectJoin - PK
ProjectID - FK
ProductID FK
qty

tblProject has
ProjectID - PK
ProjectName - FK

I have created a form - frmProject with the fields ProjectID and ProjectName. Inside this form is a subform that displays concatendated fields of the products and qty.

Object: I would like to add products Project A. (all is fine when I do this)

Problem 1: 1st of all, I don't want Project A to be able to be used twice. How can I prevent this in the form? So if a user says, they need to add items to a project, I would like to restrict them from adding 2 Project A's.

Problem 2: Why is it that when I do add two Project A (with different or the same products) the tblProject gets a record added to it. So tblProject started with Project A, B, C and if Project A gets added again to the frmProject, then the tblProject now has A, B, C, A in it. Duplication is happening on my parent table.

Thank you for any and all assistance.
Dawn
Sep 16 '06 #1
2 1990
PEB
1,418 Expert 1GB
Hi,

So a precision question? You don't want that Project A is added twice in your main form or you want that there is only one row in your subform?

If this is the first case so put a primary key or Index with no Duplicates on your Project Name!

:)

In the second case set primary key or index without dublicates in tblProductProjectJoin

:)

I have a parent table, a join and another parent. Not sure this is right.

first parent is a Products table, the second parent is a projects table. Then there is the join table.

tblProductProjectJoin has
ProductProjectJoin - PK
ProjectID - FK
ProductID FK
qty

tblProject has
ProjectID - PK
ProjectName - FK

I have created a form - frmProject with the fields ProjectID and ProjectName. Inside this form is a subform that displays concatendated fields of the products and qty.

Object: I would like to add products Project A. (all is fine when I do this)

Problem 1: 1st of all, I don't want Project A to be able to be used twice. How can I prevent this in the form? So if a user says, they need to add items to a project, I would like to restrict them from adding 2 Project A's.

Problem 2: Why is it that when I do add two Project A (with different or the same products) the tblProject gets a record added to it. So tblProject started with Project A, B, C and if Project A gets added again to the frmProject, then the tblProject now has A, B, C, A in it. Duplication is happening on my parent table.

Thank you for any and all assistance.
Dawn
Sep 17 '06 #2
Dawn
3
Hi,

So a precision question? You don't want that Project A is added twice in your main form or you want that there is only one row in your subform?

If this is the first case so put a primary key or Index with no Duplicates on your Project Name!

:)

In the second case set primary key or index without dublicates in tblProductProjectJoin

:)
Thank you. I figureed this out (the way you said) and it works. Thank you for your time.
Dawn
Sep 19 '06 #3

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

Similar topics

8
by: Michelle | last post by:
hi, i have created an array from recordset containing user names eg. (davidp, davidp, evenf, patricka, rebeccah) which i have sorted in alphabetical order, but i need to identify duplicates...
6
by: Marlene | last post by:
Hi All I have the following scenario, where I have found all the duplicates in a table, based on an order number and a part number (item).I might have something like this: Order PODate Rec...
16
by: tyrfboard | last post by:
I've been searching for awhile now on how to remove duplicates from a table within an Access db and have found plenty of articles on finding or deleting duplicates. All I want to do is remove them...
3
by: AK | last post by:
Hi Our product uses MS-SQL Server 2000. One of our customer has 10 installations with each installation stroring data in its own database. Now the customer wants to consolidate these databases...
7
by: vsgdp | last post by:
I have a container of pointers. It is possible for two pointers to point to the same element. I want to remove duplicates. I am open to which container is best for this. I thought of using...
14
by: ak | last post by:
Is it possible to find repeated(duplicate) element in an array in single loop ? AK
3
by: ryan.paquette | last post by:
In the table there are 2 fields in which I wish to limit (i.e. No Duplicates) Although I do not want to limit them to "No Duplicates" separately. I need them to be limited to "No Duplicates" as...
7
by: john.cole | last post by:
I have searched all the groups I can, and I still haven't been able to come up the solution I need. I have the following problem. In my form named sbfrmSpoolList, I am entering a job, spool and...
1
by: tskmjk55 | last post by:
Recently, I have a requirement to develop a vb.net application wherein the input excel sheet data which has an average of 5000 records should be checked for Internal duplicates (duplicates within the...
3
Thekid
by: Thekid | last post by:
I'm trying to figure out a way to find if there are duplicates in an array. My idea was to take the array as 'a' and make a second array as 'b' and remove the duplicates from 'b' using 'set' and then...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.