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

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

49
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 1184

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

Similar topics

0
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"...
0
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...
0
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"...
1
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...
2
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....
4
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...
2
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...
1
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...
3
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...
3
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;...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...

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.