Data entry creating duplicate rows in table

I have a large form "JobTrack" that has a record source of the table "Job 
Information"
I also have a subform "Tapered-Misc Form" on that large form that also has 
the record source "Job Information" 

The subform links as follows: Show Job Information for each record in Job 
Information using ID

the subforms Data properties read as follows

Source Object : Tapered-Misc Form
Link Master Fields : ID
Link Child Fields: ID
Filter On Empty Master : No
Enabled : Yes
Locked : No

When I switch from the main form to the subform and enter data, a duplicate 
record is created.  I get the following warning...

The changes you requested to the table were not successful because they 
would create duplicate values in the index, primary key, or relationship.  
Change the data in the field or fields that contain duplicate data, remove 
the index, or redefine the index to permit duplicate entries and try again.

Can someone please help to explain why it generates a new record with the 
same ID number when entering data on the subforms?  

thank you,
Michael









0
Utf
3/18/2008 5:14:00 PM
access 16762 articles. 3 followers. Follow

3 Replies
965 Views

Similar Articles

[PageSpeed] 35

Michael,

It is not normal to have a subform with the same record source as the 
parent form.  Normally the subform's record source would be a separate 
table or query that is related (normally many-to-one) to the main form's 
record source.  I can't see the specifics of what you are trying to 
achieve here, but I think you need to re-think your basic design.

-- 
Steve Schapel, Microsoft Access MVP

Michael F wrote:
> I have a large form "JobTrack" that has a record source of the table "Job 
> Information"
> I also have a subform "Tapered-Misc Form" on that large form that also has 
> the record source "Job Information" 
> 
> The subform links as follows: Show Job Information for each record in Job 
> Information using ID
> 
> the subforms Data properties read as follows
> 
> Source Object : Tapered-Misc Form
> Link Master Fields : ID
> Link Child Fields: ID
> Filter On Empty Master : No
> Enabled : Yes
> Locked : No
> 
> When I switch from the main form to the subform and enter data, a duplicate 
> record is created.  I get the following warning...
> 
> The changes you requested to the table were not successful because they 
> would create duplicate values in the index, primary key, or relationship.  
> Change the data in the field or fields that contain duplicate data, remove 
> the index, or redefine the index to permit duplicate entries and try again.
> 
> Can someone please help to explain why it generates a new record with the 
> same ID number when entering data on the subforms?  
0
Steve
3/18/2008 6:10:57 PM
Thank you,
This may be the issue.
I have information to be entered by different groups in the company.  Some 
of this information is of no interest to others and so is made "invisible" by 
making the subform visible.false.  
There is far too much information to be displayed on one form so it will 
take some creativity, but at least I have a direction now.

I will try and tackle it from another approach and somehow make it so that 
the main form is used to enter the data.

thank you,
:)M


"Steve Schapel" wrote:

> Michael,
> 
> It is not normal to have a subform with the same record source as the 
> parent form.  Normally the subform's record source would be a separate 
> table or query that is related (normally many-to-one) to the main form's 
> record source.  I can't see the specifics of what you are trying to 
> achieve here, but I think you need to re-think your basic design.
> 
> -- 
> Steve Schapel, Microsoft Access MVP
> 
> Michael F wrote:
> > I have a large form "JobTrack" that has a record source of the table "Job 
> > Information"
> > I also have a subform "Tapered-Misc Form" on that large form that also has 
> > the record source "Job Information" 
> > 
> > The subform links as follows: Show Job Information for each record in Job 
> > Information using ID
> > 
> > the subforms Data properties read as follows
> > 
> > Source Object : Tapered-Misc Form
> > Link Master Fields : ID
> > Link Child Fields: ID
> > Filter On Empty Master : No
> > Enabled : Yes
> > Locked : No
> > 
> > When I switch from the main form to the subform and enter data, a duplicate 
> > record is created.  I get the following warning...
> > 
> > The changes you requested to the table were not successful because they 
> > would create duplicate values in the index, primary key, or relationship.  
> > Change the data in the field or fields that contain duplicate data, remove 
> > the index, or redefine the index to permit duplicate entries and try again.
> > 
> > Can someone please help to explain why it generates a new record with the 
> > same ID number when entering data on the subforms?  
> 
0
Utf
3/19/2008 3:19:01 PM
On Wed, 19 Mar 2008 08:19:01 -0700, Michael F
<MichaelF@discussions.microsoft.com> wrote:

>There is far too much information to be displayed on one form so it will 
>take some creativity, but at least I have a direction now.

Two points:

1. If there are so many fields in your table that they can't all be displayed
on one screen, your biggest problem is that your table is not correctly
normalized. Twiddling with form design is not the solution - normalizing your
tables is!

2. If you need to manage screen space, Subforms aren't the appropriate tool;
instead, use a Tab Control. Put some controls on each page of the tab control
so you can view them in the same space on the screen, while having them all
"logically" on the same record on the same form.
-- 

             John W. Vinson [MVP]
0
John
3/19/2008 5:13:47 PM
Reply:

Similar Artilces:

Count Instances in a table field
Here's a little background on my database. I have a form with a couple of buttons that I have grayed out when the database is empty. These buttons open a print preview of a couple of reports. I would like to ungray these buttons only when there is at least one record with a "CA" entry in the State field in my main table. How do I do this? Forms display data from tables. I'm not understanding why you'd want a form to enable (ungray) a button if ANY record has a "CA" entry. Wouldn't you want to ungray the form if the record DISPLAYED had &q...

horizontal data to vertical data
I have a set of data list in the horizontal manner. Is there a macro that can send this data vertically instead of manually doing it? Thanks in advance. Aloysicus One way .. Assume source data is in Sheet1, A1:E1 In Sheet2 Put in A1: =OFFSET(Sheet1!$A$1,COLUMNS($A$1:A1)-1,ROWS($A$1:A1)-1) Copy A1 down by as many rows as there are columns in Sheet1, i.e. down to A5 A1:A5 will return whats in A1:E1 in Sheet1 -- Rgds Max xl 97 --- GMT+8, 1� 22' N 103� 45' E xdemechanik <at>yahoo<dot>com ---- "Aloysicus" <aloy33@singnet.com.sg> wrote in message ne...

Calendar Entry, invite one person everyone gets invited.
Hi All I have an issue with a client of ours, Where if they invite a particular single user to a calendar entry as an attendee the invite is sent out to all staff. They are running SBS 2003 Premium with ISA 2000 (not sp1) Check how delegation of the particular user calendar was made: in Outlook: tools > options > delegates and uncheck "Delegate receives copies of meeting-related messages sent to me". Xavier "Fisheye" <support@fisheye.nospam.co.nz> wrote in message news:ekECrO6SGHA.4452@TK2MSFTNGP12.phx.gbl... > Hi All > > I have an issue with...

Difficulty Aligning Series Data With Proper Dates
I ‘m building a column graph using Excel 2007 and I’m having difficulty aligning a series of data with the proper dates. I have 2 series of data – Series 1: Includes a value for each quarter in 2009 (e.g., Mar-09, Jun-09, etc). Series 2: Includes a value for each quarter in 2010 (e.g., Mar-10, Jun-10, etc). After creating each series, I select the appropriate dates (Series 1 – 2009 dates / Series 2 – 2010 dates). The first issue that I’m having is that when I select the second set of dates (for Series 2), it overrides the first – so the x-axis initially shows 2009 dates, but then ...

export public folder data?
Am in the process of performing an Alternate server recovery of an Exchange 2003 Information Store. The reason being that on the current server all the email has dissappeared from the public folder mail folders...its a very strange situation indeed. Hoping that by restoring an earlier backup to a different machine we can see if the emails will return. If they do, is there a way I could export the contents of these folders back into the current info store? I gather that Exmerge will only work on Mailboxes and not Public Folders... Many thanks in advance, Neil On Fri, 19 Aug 2005 08:58...

Pivot table samples/tutorial
Hi all :-) Excel 2003 - Windows XP Pro SP2 I am in need of some samples or a tutorial on how to create a Pivot table. I have worked with many areas of Excel, but, I have never had call to create a Pivot table, and the Help files are not exactly totally clear. I am trying to prepare some reference materials for a presentation I will be giving on the various Office programs, and would like to be able to include some good material for the Pivot table for Excel as well. I would truly appreciate any suggestions or references that might be available for download or linked to. Jan :) MS MVP...

storing read only data
I work for a powder coating company and want to make a program that will store all of the data on each part. I want to be able to go to the computer type in a part number and retrieve all of the data for that part. It has to be read onlyso that it can only be edited by a supervisor. I was told i could use excel for this and an "at" function was mentioned. thank you If the info fits in 256 columns, you can put the part number in column A and the info in B:IV. Then apply data|filter|autofilter and use that to just show the parts you want. If the data is more than 256 columns, you co...

creating a template for photos
Is there a way to create a template in Microsoft Word for photos? And to also import a group of photos all at once rather than importing them and formating them individually? The answer to your first question is almost certainly "yes", but you have not given enough information. As for the second question, you could use mailmerge to insert all of the photos into a document. See the "Graphics from data base" item under the "Special merges" section of fellow MVP Cindy Meister's website at http://homepage.swissonline.ch/cindymeister/MergFram.htm...

How to organize data?
I am a frustrated Excel newbie. I grit my teeth every time I have to use Excel. But I need to create a small database of records and chart it's monthly progression, and I think Excel is probably the best program for the job. Only, I don't know who to do this. Please bear with me as I really need help with this. Say that I have a short list of vendors in different cities. For each vendor I have a total # of items in their inventory and another # of the # of items sold from the inventory, and a percentage of that. So I have the vendors listed in Column A. # of items in inventory ...

A get/change operation on table 'IV_Options_ROPT' failed accessing
I get this error when I tried to print Inventory Activity Report. When I clicked on more info, it says "[ODBC SQL Server Driver][SQL Server]Invalid column name "LNGSTRTDESC'. It happened to me and the 'sa' account. Does anyone have a clue what happened and how to fix this? I searched on KnowledgeBase and did not find any article to address this problem. Mary, This error is occuring in Inventory Report Options Table and the column name where this is happening is Long Start Description. What I suggest you is to delete the Report option by going to Inventory Act...

Selecting specific data #2
Hi everyone I have another little problem. I have got a list of 20 items on sheet1, Cells A1 - A20 (numbered 1 - 20) and Cells B1 - B20 are items relating to that number, ie, number 1 = Concrete, number 2 = walls, and so on. Now on sheet 2 I have a table, again cell range A1:B20. I would like to know a formula so that when I enter a number in to column A, the corresponding item to that number appears in column B. ie, if I enter number 8 in Cell A1 on sheet 2, then I would like Floor to appear in Cell B1. Does this make sense? -- Thanks in advance for your help Lee Hi Lee Data range i...

Creating Keyboard Shortcuts
In Microsoft Word, you are able to create keyboard shortcuts. I'm wondering if there's a way to do that in Publisher 2003. Thanks, Carrie Do you mean for specific program operations or to start various programs? -- Don -------- Vancouver, USA - One of the great cities in one of the 45+ countries in the Americas! "luceca" <luceca@discussions.microsoft.com> wrote in message news:71F28389-1E1B-4597-920C-2736896AF8BE@microsoft.com... > In Microsoft Word, you are able to create keyboard shortcuts. I'm wondering if there's a way to do that in Publisher 2003....

How to add a space after each text value in all the cells in a row
I want to add a space (or any character(s)) after each text value in all the cells in a row or in a column For example, cell A2 contains "ABC", cell B2 contains "DEF", and so on. I want to make all the cells in row 2 to have a space so cell A2 contains "ABC ", cell B2 contains "DEF ",... try going to an empty part of the sheet (say row a4) & type =a2&" " or "[any character]" then copy that across the row for your range. after calc you can copy the range & paste special (values) back into range a2 ...X2 &am...

"external data sources" and "external data ranges"
what is the difference between these? i have run the vb macro code on http://support.microsoft.com/kb/330383 to check if i have any external data sources or data ranges but there are none. the reason i need to know is becuase i'm working with office sharepoint server 2007 and i cannot access a file thru the web access web part because it says: "The workbook that you selected cannot be loaded because it contains the following features that are not supported by Excel Services: External data ranges (also called query tables)" anyone? thanks ...

Update table from form
I am trying to update a counter table from a form. Instead of updating, a new entry is being created every time and the table end up looking like the following: Salesperson Date Leads 1 4/16/2007 0 1 4/16/2007 1 1 4/16/2007 0 1 4/16/2007 1 The code I'm using is below: RepNum = DLookup("[Rep Number]", "Debt Advisors", "username...

What was your data migration experience for MS CRM 3.0?
Has anyone used DMF 3.0 to migrate data into CRM using its wizards or stored proceedures? What happened and how did you do it? Andy It's a bit unwieldy, but if you follow the documentation closely and do thorough tests it is a helpful tool. You should be prepared to do some extensive data cleansing and search the newsgroups when you hit a roadblock. -- Matt Wittemann, CRM MVP http://icu-mscrm.blogspot.com "Andy" wrote: > Has anyone used DMF 3.0 to migrate data into CRM using its wizards or > stored proceedures? > > What happened and how did you do it? >...

Last Column With Data
How do I check a certain row to find out the last column in the row that has data? Dim myRow as long dim LastCol as long myrow = 1243 with worksheets("SomeSheetnamehere") lastcol = .cells(myrow,.columns.count).end(xltoleft).column end with msgbox LastCol This will break if you've used the last column in that row -- or if you haven't used any cells in that row. Is that a problem? Bishop wrote: > > How do I check a certain row to find out the last column in the row that has > data? -- Dave Peterson This gives a interger...

Find Date Mailbox Created
Hello, In ADSIEdit you can see the whenCreated field, but this refers to the date the AD account was created. Does anyone know how to find the date the account was given a mailbox? We had AD long before Exchange and I'm trying to find out when people were given mailboxes precisely. Thanks. i struggled with this, too, and I don't believe there is any way to get this info...I miss having that at my fingertips... -- Susan Conkey [MVP] "GC Postmaster" <gc_postmaster@gordon.edu> wrote in message news:9662BF63-2EAF-4D29-B318-0861643E87A1@microsoft.com... > Hello...

Sum of cells in column if data in cells = specific value
In column K, I have different information. Each cell either says "Returned" or "Disposed." In K35, I would like to have a total of all the cells in the column which show "Returned" and in K36, I would like to have a total of all the cells in the column whith show "Disposed" Thanks Please don't multipost. In article <c7o4m5$jp7$1@titan.btinternet.com>, "That's Confidential" <joebloggs@hotmail.com> wrote: > In column K, I have different information. Each cell either says "Returned" > or "Disposed...

Presenting Pivot table data as product of 2 source data columns
I have the following data F1 F2 D1 D2 F01 1 10 1 F02 2 20 3 F01 2 30 6 F01 5 40 4 F02 6 40 5 F1 to be presented in rows F2 to be presented in columns D1* D2 to be presented as data Is that possible without defining an extra column in my source data? regards, Louis Louise - Yes, it's a calculated pivottable field. Once you have the pivottable established except for the data values, select Options tab, Formulas drop down arrow, calculated field. "loconel" wrote: > > I have the following data > > F1 F2 D1 D2 > F01 1 10 1 > F02 2 20 3 > F01 2 30 6 >...

Undeliverable message after creating appointment
I'll try to describe the problem with some names... The Problem: "Bill" has a mailbox with a calendar. When "Steve" creates an appointment called "Test" with Bill then Steve receives the following message: Subject : Undeliverable - Test Your message did not reach some or all of the intended recipients. The following recipient(s) could not be reached: Anderson, Pamela on 10-10-2005 11:13 The e-mail account does not exist at the organization this message was sent to. Check the e-mail address, or contact the recipient directly to find out the corre...

data file: how to start its application
Hello! I have a byte array in memory for a file and also its filename (actually a mail attachment). Now I want to "open" this file. In case of a "*.doc" file I have to find the association (winword), run that program and give it a path to my memory or something like that. I think the simplest way to achieve this is to save the data into a temp file (GetTempPath + actual file name, overwriting any previous one), and then running RunCmd somehow and Windows knows what to do. I know how to write the file, but a RunCmd command doesn't exist or I haven't found some...

Quest: Creating a panel of controls in an ActiveX control...
I want to make a panel with some Windows Controls on it using ActiveX w/ full MFC or ATL support. I been looking thur app templete all day and cant find a start project for this. I am using VS.Net Pro 2002 so what is the best way to get started here... Any help... ...

merging data
I have a master file and 4 workbooks where individuals enter info daily. I need to update the master file workbook at the end of the day with the info from the 4 individual notebooks. How would I merge this data? I tried the "shared workbooks" process but it wouldn't let me do it. Please Help! Since your question is very "general", here's a "general" suggestion: Explore the use of links. Have all WBs open. Right click in a pertinent data cell of one of the 4 WBs, and choose "Copy". Navigate to the appropriate cell in the "Master&quo...

Vertical Data Extraction
Hi, I need to create a chart that is based on changing values. The Values are all stored vertically in a Worksheet called Percentage. The chart sheet contains a selection box where the user can select a specific search and a date and the selected conditions should be searched for and the chart should display results. Basically, when the user selects X in the first list box and Y in the second one, the code should search the Percentage worksheet for all instances of value=x and y and output. column Row Feature1 Feature2 Feature3 2000 0.5 8.3 10 2000 ...