473,549 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with correct loading of tab control bound to 1-to-1 related table

49 New Member
Working in Access 2003 with Access 2000 file format.

I'm trying to set up a form with a six-page tab control, three pages of which contain subforms bound to a table that has a 1-to-1 relationship with the parent form's bound table. I've proceeded to relate the tables in this way (which makes the most sense to me for the situation), encouraged by the thread below:

Limit subform to 1 entry

Now, this arrangement generally works all right, but if I come to a record that does not yet have a corresponding record in the related table, and start entering data for it, I run into problems when I go to one of the other pages of the tab control. Trying to enter more data (which ought to go into the same new related record) gives me the 'The changes you requested... would create duplicate values' error.

I gather Access is somehow trying to make a second related record, which it can't because the primary key is equal to the main record's primary key.

No problems occur once the related record has been saved (i.e., I have to start entering some data, move to a different main record and then come back); the code provided by ADezii in the other thread makes sure that the existing related record gets loaded up, for any of the tab control pages.

Another possible symptom is that sometimes I get an error like 'The record contains no data'--a dialog box that pops up three times in a row when closing the main form. I can't recreate it at the moment, and I've never known exactly what conditions cause it, but I'll be watching out.

Is there any way to force the other two pages to go to the newly created record in the related table?
Nov 9 '10 #1
0 1189

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

Similar topics

0
1172
by: Vannela | last post by:
I have got a user control with this code but i couldnt see anything in the design view of ascx page What couls be the problem? <%@ Control language="C#" AutoEventWireup="false" Codebehind="m_ts_coursesched_popup.ascx.cs" TargetSchema="http://schemas.microsoft.com/intellisense/ie5 "%> <%@ Register TagPrefix="iewc"
0
859
by: | last post by:
Hi , I did post this question in m.p.d.f.w.controls, but had no replies. I have created a control which paints/repaints by copying a bitmap. On the first page of a tab control I have no problem it paints itself ,but on any other tab page, the display is incompletem bitmap has vlines and hlines , rectangles which are missing. any ideas? ...
0
990
by: Vannela | last post by:
I have got a user control with this code but i couldnt see anything in the design view of ascx page What couls be the problem? <%@ Control language="C#" AutoEventWireup="false" Codebehind="m_ts_coursesched_popup.ascx.cs" TargetSchema="http://schemas.microsoft.com/intellisense/ie5 "%> <%@ Register TagPrefix="iewc"
1
2299
by: José Joye | last post by:
Hello, I'm playing around with dynamically loading user controls ...and having problems I created a really simple userControl (in fact contains a plain text box) and placed it into the MyTestCtrl2.ascx file. In an aspx file I placed the following in the Page_Load method:
2
1609
by: dorrit.Riemenschneider | last post by:
Hi, I develop a sharepoint webpart with ASP.Net 2.0 and therefore override CreateChildControls(). In CreateChildControls() I create dynamically a menu with items (and sub items) from a database. Let's say after the first loading I have 5 menu items. My problem: Every time the page is loaded (that means also if a menu item is clicked) the...
4
2155
by: Prabhua | last post by:
Hi, can anybody clear my doubt in asp.net using c#. i am deleting record in database using gridview control. the problem here is that record gets deleted in database but the changes is not reflected in the gridview control.i also used "gridview1.Databind()" after delete query. what should i do now? regards, a.prabhu
2
1529
by: localhost1 | last post by:
hi everyone my all pages are loading appropriately in FireFox but showing problem in IE 6. what happens in IE6 is that all the pages load and all the contents of the pages are also loaded but the logo at the top right corner is still running for very long time and the progress bar at the buttom is also moving for very long time. pls give me...
1
1084
by: shyam | last post by:
Hi, I have a probelm in Iframe that the webpage contains two links.Each link has seperate java script codings. While loading the page for first time,There is no problem.But while postback,the second link will not be displayed in iframe. This problem is found in webpage having script only.Other files which do not have javascript are...
3
1778
by: DoB | last post by:
Hi, I was trying to configure the Trace class using the app.config. I was followig the example configurations in the MSDN. However, as I debug the program, the Trace class seems to ignore the configuration. For example - it has its default and only listener while I removed it and added some other listeners in a config file. Am I missing...
3
2835
by: sandeep kumar shah | last post by:
I am facing one problem on loading the xml file The code is 1. XML file //attribute.xml <?xml version="1.0" encoding="UTF-8"?> <person> <name>sandeep</name> <address state="Goa �D; Panjim" distt="madgaon"/>
0
7546
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7471
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7740
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6071
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5387
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5111
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3496
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1082
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.