473,804 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto field entry

I have a MAIN database and a Detail database. They are linked by ID
field. I have a case number in both databases and I want to be able to
enter the case number in the MAIN database and when I create a new
record I want it to automatically show up in the Detail database case
number field.

I have gone in and linked the two case number fields in the
relationship boxes, but it still won't update in the Detail DB.

What do I need to do?

Nov 13 '05 #1
3 1582
Umm... whoa. this sounds like FileMaker-speak. They're not
*databases*, they're *tables*. Okay, that out of the way, on with the
questions... do you have a relationship set up between the two tables?
(Open relationships window, drag and drop primary key of parent table
onto PK of child table.)

Then reopen your form and see what happens... it should work now.

Nov 13 '05 #2
The Main Table already has an ID field that is set up with a hidden
autonumber that is linked to an ID field in the Detail table. The Main
ID field is the primary key.

In the Detail table I have a CODE field that is autonumber that is the
primary field.

I need for there to be a one to many relationship with the case number.
The Case Number can not be a primary field is the message I get when I
try to make it the primary number. Is there another work around?

Nov 13 '05 #3
Okay, so you should have a Long Integer type field in the Detail table
that you use to link to the Main Table. Once you have that, you can
join the two tables. This may not work if you have data in the two
tables and you violate referential integrity.

I know it's coming, so let me explain that. (Ready for a bit of set
math?) Basically, you cannot create a relationship between two tables
if there are values in the *child* table (Detail table, in your case)
that are NOT in the primary key of the main/parent table.

You can find these records that would cause this by using the Find
Unmatched query wizard. Or use something like this:

SELECT Detail.[Case Number]
FROM Detail LEFT JOIN MainTable ON Detail.[CaseNumber]=MainTable.ID
WHERE MainTable.ID IS NULL;

Then you should get the list of all key values that are causing your
problem. Then you can change the filter to NOT NULL instead of NULL
and append those to a new table and enforce integrity there...

Nov 13 '05 #4

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

Similar topics

1
6590
by: ogilby1 | last post by:
Using an immediate if to fill a field on a form based on the value of another field. During data entry on the form this methodology works well. When looking at the results in the datasheet view or the underlying table this immediate if field contains the default value that was set when originally setting up the table and the form. =IIf(=10100100, "CR", "DB") => this works well in the flow of the form but does not actually populate the...
2
12720
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error telling me that "Number of query values and destination fields are not the same." If I add a value for the auto increment field to the SQL String the data is entered into the table with no problems but obviously the auto increment field now...
2
3284
by: buck | last post by:
I'm working on a helpdesk database - does anyone know how to auto enter the date in a new record; would it be soemthing like iif field is null auto enter?
2
2995
by: Mike N. | last post by:
Hello- I have a database that uses an auto number field type that goes out of sync periodically. My customer gets a "cannot add record, number already in use" error message. I dump the records into a new table starting at auto number 1, and sequentially up to about 20,000. Everything is fine for a month or two, then the auto number field goes berserk again. Do you have any ideas what the client may be doing to cause this problem, or is...
1
3094
by: ainsley | last post by:
Hi this is going to sound like a very basic question, but I am creating a database in Access which is based on a number of unlimited tables. In my data entry form i have a number of combo boxes relating to these tables in which the look up field has no limit to list, as I require the users to be able to add new fields. This works fine, however, I want the fields in the table that each combo box relates to, to auto update when a new record is...
13
4728
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when i type in the details. I have just moved over to mysql server with access as the front end. I have setup the sql tables with the customer number as autonumber. When i go into the form and add a new customer it does not generate the
5
2010
by: arali | last post by:
I have builed a database in access and using forms of Visual Basic6 The problem is this I have a field Id which is of type long and autoincrement Now when i create a form and run and type my frist entry in id field like 1 it give me the message field is not updateble. Plese tell me what the problem is this and how i can over come this problem. and how it will show ID field first auto number automatically. ARALI
2
1463
by: sam the lion | last post by:
Hi, I'm currently running Access 2007 on Windows XP Professional. I'm a novice for the most part, and this is my first database. I'm having difficulty figuring out how to do the following: 1. I'm currently setting up a form for the UI. I need to have a Yes/No field set-up so, when checked it auto-fills the date in separate field. I have the fields created, but I do not know how to implement that 'action'. 2. On the same form I have a...
11
4086
by: ZaphodBBB | last post by:
Hi I have a table that has as its Primary Key the Auto-Increment Field: Equipment_Number. In M.S. Access is there any way to define a starting number for the field? OR another way in which I could save the same problem would be: I have a form frmAddNew_Equipment, once all the fields are filled in correctly and it has been verified that there is no double entry etc, and the 'SAVE' button is clicked (unbound form), another form, bound...
5
8108
by: David Wright | last post by:
Hello Everyone I would be grateful if someone could help me with the automatic increment of a field on my subform called ‘Test_SrNo’. I am Using Microsoft Office 2000. The auto entry of the incremented number would help to reduce errors and make data entry simpler. The next record in the Test_SrNo field should not have any entry in it until the text insertion point enters the Test_SrNo field. Example: If the last test serial number...
0
9716
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10604
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
10359
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
10101
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...
1
7643
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
6870
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();...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3837
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3005
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.