Intermittently receive create duplicate values error

I have an unbound form with a combo box of Items built using  (SELECT Items.
ItemID, Items.Desc FROM Items ORDER BY Items.ItemID) in the row source
property

I have a subform with a text box bound to Cost in the Items table.  The data
in the subform is synchronized by the properties link child fields ItemID in
Items table and link master fields ItemID in combo box

My intention is for the user to be able to change the Cost and the underlying
Items table be updated.  (I added Me.Requery to the the AfterUpdate event of
the Cost text box to redisplay the new Cost.)

Most of the time this works great.  Occasionally I am getting “The changes
you requested to the table were not successful because they would create
duplicate values in the index, primary key, or relationship”

What would make Access think I am trying to add something new as opposed to
updating existing data?

Thanks!

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200708/1

0
Lee
8/22/2007 1:37:22 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
504 Views

Similar Articles

[PageSpeed] 30

The only code is the SQL select statement in the Row Source property of the
to combobox and the Me.Requery in the AfterUpdate property on the the text
box.

Klatuu wrote:
>Since it is an unbound form, you will need to post the code where this 
>happens and identify the line on which it happens.
>> I have an unbound form with a combo box of Items built using  (SELECT Items.
>> ItemID, Items.Desc FROM Items ORDER BY Items.ItemID) in the row source
>[quoted text clipped - 16 lines]
>> 
>> Thanks!

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200708/1

0
pireland
8/22/2007 6:53:27 PM
Updating existing data could do it if somehow an index field that has to be 
uinque has changed and there is another record in the record source that has 
that value.
Because there is only the SQL and the unbound combo, I don't know if I could 
isolate the problem for you.
My suggestion would be to see if you can purposely create the error.
-- 
Dave Hargis, Microsoft Access MVP


"pireland via AccessMonster.com" wrote:

> The only code is the SQL select statement in the Row Source property of the
> to combobox and the Me.Requery in the AfterUpdate property on the the text
> box.
> 
> Klatuu wrote:
> >Since it is an unbound form, you will need to post the code where this 
> >happens and identify the line on which it happens.
> >> I have an unbound form with a combo box of Items built using  (SELECT Items.
> >> ItemID, Items.Desc FROM Items ORDER BY Items.ItemID) in the row source
> >[quoted text clipped - 16 lines]
> >> 
> >> Thanks!
> 
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200708/1
> 
> 
0
Utf
8/22/2007 7:46:00 PM
Thanks for your help.  I will keep trying to find the sequence of events that
makes the error occur.


Klatuu wrote:
>Updating existing data could do it if somehow an index field that has to be 
>uinque has changed and there is another record in the record source that has 
>that value.
>Because there is only the SQL and the unbound combo, I don't know if I could 
>isolate the problem for you.
>My suggestion would be to see if you can purposely create the error.
>> The only code is the SQL select statement in the Row Source property of the
>> to combobox and the Me.Requery in the AfterUpdate property on the the text
>[quoted text clipped - 7 lines]
>> >> 
>> >> Thanks!

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200708/1

0
pireland
8/23/2007 11:43:16 AM
Reply:

Similar Artilces:

Errors with Distribution Group Wizard and link to Public Folder Ar
I'm having a problem with setting up a Distribution Group with the Public Folder. My objective is to create a number of Distribution Groups that will archive the e-mail to them to a public folder. The DG and PF are both being created, but the link between the two is not. My objective is to use the PF as the store where a team will go to view general e-mail addresses that are being sent (webmaster@mycompany.com, for example). I am using the Add Distribution Group Wizard (ADGW, Server Management\Standard Management\Distribution Groups\Add a Distribution Group) to add the DG. I am...

First Try at Creating a User Form
I have exhausted my search abilities to find an answer to what should be a simple question. I created a user form that pretty much duplicates the built in Data Form. The major difference is that it does not contain all of the fields in the data base -- just a few of them and it doesn't have all of the controls only a Next and Previous control as well a Close. The form is just what I want but I can't figure out how to get it to display the values of the fields when I open it. That is the first problem.. I want it, like the built in form, to show the values of fields for each recor...

converting text values to number & decimal values..
I have any array which read a csv file and I am using split and populate these fields into my table.. temp= 5245,test1,23.45 temp1=3456,test1,23.45 Now I want to convert my text fields to number and decimels respectively. I tried the following functions but this works fine if they are number and fails it was text value. TESTID = CInt(sampleid) 'CInt(myarray(1))Convert to number CT_num = CDec(ct_val) -- Message posted via http://www.accessmonster.com Hi, Test to see if they are numeric first. If IsNumeric(sampleid) Then TESTID = CInt(sampleid) Else ...

Insert spaces between pasted values #2
Hi! Is there a way to insert spaces between values that are pasted? For example, i have in rows 1,2,3 values a,b,c and i want to paste them into another list in rows 1,3,5 respectively (with a single-row space between pasted values). Thanx! M I presume you have more than just 3 rows. A general approach would be to use a helper column next to your data and to fill a simple sequence down that column for as much data as you have. Then copy all the numbers that make up that sequence and paste them immediately below the sequence in the same column, so that if you have 200 numbers for example the...

Help! How I can create...
I need to create a toolbar (if it is) such as the workspace window in VC++ with a CTreeCtrl within... How I can proceed? Thank you! On Thu, 27 Nov 2003 13:03:19 +0100, Gaetano Sferra <rebusmail@iol.it> wrote: > I need to create a toolbar (if it is) such as the workspace window in > VC++ > with a CTreeCtrl within... > How I can proceed? > > Thank you! > > Hi, Check out www.codeproject.com It has all the answers and more. Paul. > Check out www.codeproject.com It has all the answers and more. Hi Paul, please be more specific... I've already se...

MSDN Installation 1.2: Javascript Errors
I have installed a CRM Server and separate CRM client (along with the supplied example database). Access through IE6 works fine. Within Sales for outlook, I have 2 issues; 1> It takes 1.5 minutes to start up Outlook (it's only a 1Ghz machine, but CPU usage appears as 1-2% while it is loading). 2> I get various script errors when clicking on the CRM Shortcuts; Errors include messages such as... 'http//crmsvr/sfa/home_comps.aspx - object does not support this property or method' IE script error 'Could not complete the operation due to error 80020101' For testing, ...

Server Error in '/' Application. 08-10-06
Dear all, Out of a sudden, I'm unable to login to a production server using the default account used for installation. Any help would be appreciated! Microsoft CRM Unhandled Error Details: Server Error in '/' Application. -------------------------------------------------------------------------------- Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.N...

Outlook 2002 retrieving duplicate messages on startup
I'd be very grateful for help on this problem that has been seriously bugging me. When I start up Outlook, it downloads all the mail from my POP3 server, not just the new mail, and so I get many, many duplicates. So long as Outlook stays running, though, it behaves fine, with each send/receive just getting the new mails, as it should. I use two POP3 accounts, and both send through the same SMTP server (which requires me to log on). Sometimes it gets duplicates from one account, sometimes from the other, sometimes both, but always from at least one. The same mail settings work fine...

Microsoft Outlook 2000 error #2
I have not been able to keep Outlook up on our server, it closes soon after it is opened with this error that I cannot understand. It says: Exception: access violation (0xc0000005) Address: 0x3f99a142 What does it mean and how can I fix it? Does anyone have any idea? Thank you! ...

Ports 465 995 Error 0x800CCC0F Windows Mail
AT&T internet server new outgoing and ingoing email ports 465 and 995 do not work with Windows Mail Vista 64-bit OS. Need to change from old ports 25 and 110. Does anyone know how to fix? -- sumac Posted via http://www.vistaheads.com "sumac" <sumac.424jga@no-mx.forums.vistaheads.com> wrote in message news:sumac.424jga@no-mx.forums.vistaheads.com... > > AT&T internet server new outgoing and ingoing email ports 465 and 995 do > not work with Windows Mail Vista 64-bit OS. Need to change from old > ports 25 and 110. Does anyone know how t...

If cell value is greater than another cell value, clear contents.
Okay, hopefully this is the last question today! I've found the below formula in one of the posts here, but my brain has completely failed on me and I'm not sure how to adapt it to my requirements. I have a value which is entered by the user after a prompt, that populates in cell G4 in a sheet called 'Lookup'. For arguments sake, the current value is 30/11/09. I have another worksheet, 'Data', which has a column populated with dates (say column B). I'd like a macro that looks in column B on the data sheet, and clears out any dates which are gr...

negative values on axes
hi there; this is my first mail here. well my x axes start from -2 and my Y axes data start from -5, I change both to -5 (scale) they are shown (XY scatter dots) as cross, like + sign. what I need: how to change the graph punt the joint axes point from 0 to -5? so the chart shws as usual not like a cross. Best Darius Hi, Change the Values axis crosses at to -5 for both axis. This is an option on the Scale tab of the Format Axis dialog. Cheers Andy Darius wrote: > hi there; > this is my first mail here. well my x axes start from -2 and my Y axes data > start from -5, I chang...

Error while synchronizing with net time server
Vista Ultimate SP2 I just noticed that my machine will not synchronize with any of the Internet time servers. It's set to do so automatically, but I see an error saying "An error occurred while Windows was synchronizing with [server name]. This happens is I try to sync manually, and it happens with all server (i.e. time.windows.com, time.nist.gov, time-a.nist.gov, time-b.nist.gov, time-nw.nist.gov). Suggestions? Thanks. Ken Isaacson SILENT COUNSEL, a legal thriller www.KenIsaacson.com Ken Isaacson wrote: > Vista Ultimate SP2 > > I just noticed...

How to export values from XY (Scatter) graf?
Is it possible to export each x and y value from XY (Scatter) graph? ...

How do you ensure that null-valued elements are not serialized?
I am using complex types in order to support serialization/deserialization of floating point numbers, since floating points can't be null. I've seen how to suppress attributes that are "not specified", such as having a float member called Value, and a bool member called ValueSpecified. This instructs the XML Serializer to omit that attribute altogether if it wasn't "Specified". But how can I tell it to omit the XML element altogether? Here's the problem: I deserialize an object that looks like this: <person> <name>Joe<...

Any tip / clue to troubleshoot errors when upgrade GP10 SP2 to SP4
There are a few error messages during GP 10 SP2 upgrading to SP4. Installation of SP4 was fine, but until the stage when it run GP Utilities, a few error prompted. Another error is related to Dexterity Runtime - Add-In Initialization Error. Could you please provide me some clue or guidance on how identify the reasons for the errors. Many thanks in advance. http://img651.imageshack.us/img651/6400/errorwhenupgradegpsp2to.png http://img52.imageshack.us/img52/6400/errorwhenupgradegpsp2to.png http://img191.imageshack.us/img191/6400/errorwhenupgradegpsp2to.png Error when running GP ...

Error when send email from campaign response using template through workflow
Hello, There is an invalid argument error shown in workflow records if send email from campaign response using template. Is it impossible to send email in this way ? ...

Capture initial value of text box
Not sure why I can't seem to get this to work, but here's what I'm trying to do: I have a text box, 'Actual_Due_Date', tied to a field in a table. In the same table is a text box named 'Org_Due_Date'. When the initial value is set in the 'Actual' field, I want to capture and store it permanently in the 'Org' field. I have two forms, a New Project form and an Edit Project form. My thought was to just setup a simple macro in the New Project form in the 'Actual' field that says After Update set the 'Org' field equal to the 'A...

Hide rows with value "Hours"
I would like to toggle rows to hide/unhide based on the value "Hours" in column B. I think filtering is an issue to some blank seperator rows and merged cell headings. There are no merged cells involving Column B. Thanks. Public Sub ProcessData() Const TEST_COLUMN As String = "B" '<=== change to suit Dim i As Long Dim iLastRow As Long With ActiveSheet iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).row For i = 1 To iLastRow .Rows(i).Hidden = .Cells(i, TEST_COLUMN).Value = "Hours" Next i End With ...

Dynamic Bar of Pie Chart: Series1 Label & Value Issue
I have created a Bar of Pie chart and everything works great. I even have named ranges on my data so that the bar portion automatically updates when the data changes. However the Series1 Label on the pie itself does not change to reflect the new total so that it is the sum of all the values in the right column below. Does that make sense? I have one series and my data looks like this: Contracts 100 Name1 100 Name2 150 Name3 200 Name4 75 Name5 50 Name6 25 The pie portion has Contracts & Other as labels with the totals of...

Error Handler #2
Has anyone written an error handler for VBA forms. The error handler would display error messages based on bad input and pop up messages dynamically, etc. If not, has anyone developed a clean way to display error messages without using excessive message boxes? Thanks for any help. --- Message posted from http://www.ExcelForum.com/ Instead of message boxes and popups, consider a label on the form itself that displays the error message. In article <Ripan.zrum2@excelforum-nospam.com>, Ripan <<Ripan.zrum2@excelforum-nospam.com>> wrote: > Has anyone written an error ...

Invalid Argument Error when using 1/1/08 as a date
Hi all, Not sure if this is a known issue - can anyone else create a record that contains a date field with the value of 1/1/08 or 1/1/07, save it and then open it again without getting an "Invalid Argument" error. I am able to produce this error across different environments, different entities and different date fields. Would be interesting to hear more about this. Thanks Hi there, Just to let you know, I just created a task in CRM 4 and set the due date to 1/1/08 and it worked without any issues. This is a field displayed as a Date/Time box, on not just Date. I don...

Creating a simple form in Outlook 2003
This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C3FAEF.C4CC0AA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Can someone walk me through how I would set up a simple form in Outlook, = that when sent, the form would be in active visual mode when received by = a recipient? I don't find the help very helpful. I.e.... how about as an example it would ask the question "What day = would be best for you:". To the right of that I would like a simple drop = down menu that would have the choices Monday to ...

Error while installing language pack in MS CRM 4.0
Hello people, Downloaded and installed a couple of language packs succesfully in MS CRM 4.0. However, when I log into the CRM interface to actually activate the language pack I get an error when I try that. When I look at the application log in Windows, I can see the following error coming form the MSCRMWebService: MUI Provisioning failed. Error: Cannot insert duplicate key row in object 'dbo.LocalizedLabel' with unique index 'ndx_LocalizedLabel_ForSingleSelect'. The statement has been terminated. Anyobdy a suggestion ? Many thanks in advance ! Regards, Mav. I have...

Delete records when certain records have duplicate column data
Hi, I'm new to excel. I want to delete (sort of) duplicate records. My spreadsheet has many columns. My spreadsheet has many records I want to delete records where the data in just a few columns is the same in multiple records. (e.g. if the values in columns "A" "B" "D" "F" in any record is duplicated in multiple rows ..delete all matching records/rows. A= house number B= street name D=apt number F=city Bonus points: Can a macro/button be created that will allow me to load a spreadsheet and then somehow run the above filter/function on the ...