473,618 Members | 3,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[Access 2000] Create subsidiary records in related (1-1) tables?

What¹s the appropriate way to create records in related, subsidiary
tables when a record is created in a main table?

I¹m using Access 2000, and I have a main table called tblProject, and a
few other tables in one-to-one relationships with it (on the field
ProjectKey), called tblProjectAccou nting, tblProjectSales , etc. (I
separated them to get around the limit of 255 fields, and to make
record-locking more flexible.)

My first thought was to let Access manage the relationship, and hope
that it would create the subsidiary records automatically -- but that
way, when I try to type into a new record, I get error messages like
³You cannot add or change a record because a related record is required
in table ŒtblProjectAcco unting¹.²

So I tried to create the subsidiary records in the Form_BeforeInse rt()
procedure, but the ProjectKey field in tblProject doesn¹t seem to be
valid at that point; if I try to use AutoNumbers for ProjectKey, its
value is null, but if I try to generate my own key values and save them
to ProjectKey, I get error-messages like ³Index or primary key cannot
contain a Null value.²

I also considered putting in a button ³Create Project Record², and only
allowing the user to create new records under programmatic control, but
it looked like a pain to remove the navigation buttons and create my own
that would special-case the ³forward² button for the case of creating a
new record; and I couldn¹t find any documentation about disabling the
³New Record² menu-item.

TIA,
Jonathan
Nov 12 '05 #1
0 1794

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1799
by: Think | last post by:
I want to build a new field based on field START_TIME (1.12.2003 1:37:32) called TOTAL_NUMBER_OF_CALLS. In this field I want to have a number of total records. That number I see at the bottom of the page (navigation buttons). Thanks in advance.
1
2500
by: Dave | last post by:
I have a form which is based on a table (a) with over 6000 records.I have a button on this form which will open another form with related data from another table (b). What I want to do is open the second form and see the related data or if it hasnt got any related data create a new record in table (b) so that I can input data. If possible I dont want to create a one to one relationship between the tables but create the new records in table...
0
2087
by: brijeshmathew | last post by:
Hi I use Visual Basic 6, Service Pack 6, Microsoft ActiveX Data Objects 2.8 Library(msado15.dll) and access 2000 database using JET 4 OLE. I have an application that adds records simultaneously to the same table. During the simultaneous add and update, a Locked error occurs, and most of the times it locks all the machines. I have been reading on Microsoft Site and on google groups that JET4 and ADO have fix for page locking , which...
3
2698
by: Huw Davies | last post by:
I have created a split MDB that was intended for use on a single PC.The user has asked for it now to be setup as a multi-user (without security) system. I have placed the "application" mdb on one PC and linked to the "data" mdb across a Windows network. The linking works fine, but when I open a form that is supposed to display records on a continuous form, only existing records are displayed, i.e. there is no "blank" new record...
7
3416
by: smd | last post by:
Hello and thanks for taking the time to read this. I've looked all over the web and newsgroups and can't find a solution to my problem. I've posted this question to the Access 2000 group as well - sorry for cross posting. Back ground: User at remote site has Access 2000 running on XP (don't know SP of either). Linked tables are DB2 v8 running on AIX. All of the linked tables are in the same database and schema.
15
1777
by: Hexman | last post by:
Hello All, How do I limit the number of detail records selected in a Master-Detail set using SQL? I want to select all master records for a date, but only the first 3 records for the details (based on the primary key of the detail record). I've been trying with "TOP 3", but can't get anywhere. Using Access 2000. Something like: SELECT t1.*, TOP 3 t2.*
11
3663
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night) and the 'employee name'. There is another table which assigns an ID to the Shifts, i.e. 1,2 and 3 for morn, eve & night shifts respectively. From the mother table, the incentive is calculated datewise for each employee as per his shift duty. In...
1
1385
by: Landon | last post by:
Ver: Access 2003 Hi everyone and thanks in advance, General Issue: I want to make a table whose data polls from two other tables and will update (add new records) if additions are made to either of those reference tables. Simplified Example: Table 1 has a record for each student. Table 2 has a record for each book in the library.
2
1960
by: Jiwei06xie | last post by:
Hi All, I am trying to upgrade an Access 2000 DB to 2007 (using linked tables and ODBC to connect to backend SQL 2000 database). In my DB, I have a mainswitch board and some command buttons on it. When I click the command button it should open another form to show some records. My problem is that some of the buttons work fine but some others just stuck there and then poping out an error message asking me to manually choose SQL server and...
0
8150
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8650
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8303
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8453
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7124
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6098
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5552
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2582
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1760
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.