Updating A Related Table

Jun 26, 2007

I have two databases, one containing the tables and one containing the forms and queries. The forms/query database is built from linked tables from the tables database. I would like to expand one of the fields from 7 characters to 9 characters. I planned on doing the in the table database, then updating the linked table. However, the table I need to alter has relationships with about 10 other tables and I get the (you cannot make changes to a related table error message). Is there a way I can make this change without deleting all the relationships?

For future reference, should the relationships have been created in the form/query database?

Thanks, N

View Replies


ADVERTISEMENT

Tables :: Related Table IDs Not Updating

Dec 3, 2012

I'm not sure why a couple tables are not being updated after entering data. I think my relationships are correct. I've attached the database.

steps:
open Main form
add addres then try to add an owner. it doesn't work the first time but it does work the second time. add test data and that works. now if you look at the related tables (OwnerInfo, WellLocation, TestData) they all have p_id which is the wellLocation Id

now open gernalinfo form
enter in info (tests requested doesn't work right now but you can click on them in the tbl GeneralInfo)
Now if you go to the table OwnerInfo and TestData the key p_id has not been updated. But it's there in WellLocation (ID).

Why are these tables not getting updated?

View 3 Replies View Related

Updating Form After Adding Fields To Its Related Table

Apr 25, 2012

I decide to add a new field to its related table. I always wait to create the form until I think my table is complete, but sometimes I just end up needing to add more info. Is there a quick way to update the form to include my new fields?

View 7 Replies View Related

Updating Related Tables

May 15, 2006

Hi everyone!

My names james, im 18 and im a data manager for a school.

My schools database stores student data such as names, classes and exam grades. I have a table containing each students personal details such as name and address. Each pupil is assigned a unique PupilID which is the primary key. I then have a number of other tables linked to it with one to many relationships. Each of these tables holds a different set of exam results. The tables are linked through PupilID. The primary keys for the other tables are auto numbers.

The problem is this: when i add a new student to the Students table i cannot get their PupilID to automatically be entered into the other tables containing grades as part of a new field. How can i make this happen?

Thanks.

View 9 Replies View Related

Updating Related Tables.

Jan 22, 2007

Ok due to user error (and my own fault for not archiving an old database) we now have two databases which have had data entered into with the same table structure.

The table structure we have at the moment is with the related field in []:

Propertytbl[Propertycode] is related to Systemtbl[sysID] which is related to Assessmenttbl.

There is also another Temperaturetbl linked to Systemtbl by [sysID]

The problem i have is sysID is an autonumber. I can't simply paste in the difference in data as the assessmenttbl records and Temperaturetbl records will point to a different system (as the sysID will change in the Systemtbl data)

Can anyone think how i can do this either through using queries or programmatically so that i don't have to enter 5000 records manually.

I've tried using append queries but this produces the same affect as above.

Many thanks

Matt Collins

View 1 Replies View Related

Updating From Related Tables

Apr 2, 2007

I have a combo box in my main form that gets its list of physician names from tblPhysician. When the physician is chosen and the record saved, it saves the PhysicianID to my main table, tblOncReg.

When I delete a physician, any record that had that name chosen continues to have that name in the record despite it being deleted from tblPhysician.

I thought that setting relationships would solve it, but when I select "Enforce Referential Integrity" and "Cascade Update Related Fields", I get an error saying "Invalid field definition 'ID' in definition of index or relationship.", and it doesn't set the relationship.

Would setting the relationship solve that problem?

View 4 Replies View Related

Design Question: Updating Related Tables

Apr 25, 2005

Greetings.

As a relative newcomer to Access, I am having trouble deciding on how to design the form flow for updating and creating related records. I'm looking for a variety of suggestions so that I can decide what's best for the user and what's best for screen flow.

Here's the structure: I have what's called "an Event". Each Event can have multiple "Trials". Each "Trial" can multiple "Classes".

(This is the structure for a dog obedience competition)

Tables:
tblEvents - PK = eventID
tblTrials - PK = trialID, FK = eventID
tblTrialClass - PK = trialclassID, FK = trialID

Currently, for "display" or "browse": I have the following form structure:

frmEvents - single form format with a subform called sfrmTrialInfo, no navigation control - entry to this frmEvents is from an unbound pop-up form that uses a combobox to select the Event for viewing.

sfrmTrialInfo - single form format with a subform called sfrmTrailClass, has navigation control so that the user can display all trials for this event

sfrmTrailClass - continuous form format with navigation control so that user can display all classes for this trial.

My dilemma is what is the best method for letting the user create a NEW Event-Trials-Class structure. Right now I have a button on that pop-up that is used to create a NEW Event. It brings up a blank frmEvent form with the blank imbedded subforms. This is still in the design stage.

I want to have control over the data (as the user is typing ... don't let the user move forward until all requisite data is entered), but I, also, want to make the process relatively pain-free for the user.

Do you have any suggestions on a design?

Thanks, in advance, for your input. :)

Regards,
SueB

View 3 Replies View Related

Forms :: Updating Fields Via Code Not Updating Table

Dec 16, 2014

I have a form that has combo boxes and text fields (as well as sub forms). There is also a button linked to some code that says'

Private Sub cmdQuote_Click()
'Creates quote date and prints quote
Me.QuoteDate = Now()
Me.cbAgentID.Requery
DoCmd.OpenReport "Quote", acViewPreview, , "BookingID = " & Me.BookingID
End Sub

When the button is pressed the QuoteDate field (it is bound) should be be populated, but unfortunately it is not. I have played with refresh and requery but cannot derive a solution.

View 1 Replies View Related

Forms :: Enter Details In Main Table And Related Sub Table

May 5, 2013

I have a table TO-det and another table DO-DET.The table DO-det will have details about all DO for each TOID record.Both have a common field name TOID The tables are related under ONE-MANY relationship.One TO-DET record can have many DO-DET record

Now I wanted to create a form where if i add a new record to TOID i must also be able to add data for DO-DET for that corresponding TOID.

View 1 Replies View Related

Stock Symbol Table And Look Up Data Type In Related Table

Jul 10, 2012

I previously created 2 tables:

One lists all the stock symbols and company names = SYMBOL
The second table lists the purchase information for each stock = PURCHASE

I then created many queries, etc. using this data. Symbol is the key link between the various tables, queries, etc.

NOW that I understand the lookup wizard in the data type, I would like to change the symbol field in the purchase table to a Lookup field. I, of course, receive a message. I am told to delete the relationship with the other tables. If I remove the relationships and change the data type, can I then replace the relationship with out damaging all the queries and forms?

View 1 Replies View Related

Using Foreign Key To Get Related Values From One Table Onto Another Table?

Sep 25, 2013

I created 2 table that are linked to a link table so to get a many to many relationship.I have a table for locations and a table for parts.One location can have many parts and One part can belong to many locations, that is way the many to many relationship.

how to get values from the parts table to the Location table using the linked Primary Key in the foreign key linked field.The values also have to be interactive, if I change the value in the part table it needs to update in the location table.

What can I put in the field of the location table to get a specific value from the parts table?

I tried setting the field to calculated field and put the Dlookup function but that didn't work. The lookup wizard seems to be the solution, but I can only create combobox or list box and I need to select the value manually. I just need a value to be put automatically by looking at the foreign key.

If I put the Dlookup function on the default value, those it update if a value is changed in the part table?

View 3 Replies View Related

Table Related To A Field

Nov 21, 2006

Hello

Could you help me ?

My problem is :

I'm developing a ms database for the a "repair service" .

I created a table witch contains basic data from customer, including its unique ID number (key field), name and contacts ...

Now I need to store the "repair service" data from each costumer ( its time consumption, replaced materials...) in a separate table but, If I'm thinking well, I must have a table for each costumer so, I will need to link each individual "repair service" data table from each costumer to each costumer itself.

Do you know how to do this ?

Lots of thanks in advance,

Miguel

View 4 Replies View Related

Related Table Fields

Mar 13, 2008

Greetings to everyone,

I'm building a database which will generate work orders, and those have a opening date and closing date, besides that it has a work order number that is of the following format:

YYYY/ NNN (being the NNN the work order number in that year)

to create the number of the work order I'm trying to fill the WOYear field
with the year of the WODate field...but I'm not being able to do it...
How should I do it?

Thanks.

View 5 Replies View Related

Query Related To A Table?

May 29, 2005

Hi :confused:
I am trying to set up a query. i have to work out the cost of a phone call with the use of three fields--
i have: lenght of call, country call code-e.g england is +44(these are fields in my query) and then the cost per minute values for each country call code(but these are in a table)
e.g.Country CodeRegion Cost per minute
+1 United States, Canada, Caribbean£0.20
+20Egypt £0.30
+212Morocco £0.30
How would i set up a query to solve this problem?#Can someone please help me???

View 1 Replies View Related

Querying A Related Table.

Dec 9, 2007

I have a very simple database with two tables. One stores Schools that I work for and the other holds people that work at that school.

I have a form that displays information from the schools table and I have a button that I want have open a form that displays the people that are related to that school.

THe problem is I can't figure out how to limit the recordset to just the people from the school record I was just viewing.

For example. I am looking at a record with School ID 1. I want to run a query on the People table that will return just the people that work for school id 1. I just can't figure out the criteria part.

Any help is appreciated.

Thanks

View 3 Replies View Related

Calculating Value From Non-related Query And Table

Aug 30, 2007

Hi, I'm a total newbie at Access, and know nothing about scripts. I've been operating at the level of using the Wizards and drop-down menus. I am trying to create a report that does two things:
1. Displays the results of queries that sum data from a table (I think I have this figured) and
2. Displays those sums as a percentage of a number that is input each time the report is run. (This is only one number that comes from a totally different place and has no prior relation to the data.)
Any help/advice that anyone could offer would be much appreciated!
Thanks!

View 5 Replies View Related

Delete Duplicate In A Related Table

Dec 14, 2004

Hello,
I have two related table: table_Company and table_contact. Now i have:
Table_Contact Table_Company
James Bolton -----------> MacDonalds
Hellen Kidman ----------> MacDonalds
Now, i wanna have one "MacDonalds" in my Company table, and delete the others "MacDonalds" and still have the relationship between my contacts and their company.

View 4 Replies View Related

Displaying Data From A Related Table

Sep 5, 2006

Hello,

I have a form based on 1 table and I am trying to find out if I can display data from another table if I have a relationship between the 2 tables?


Thanks

View 1 Replies View Related

Adding Records To Related Table

Sep 28, 2006

Hello I need to add daily records to a related table using a form, from a button or subform displayed on a form updating the master table.
This would enter the related key to the new form ready for insertion etc.
Can this be done?

For example

Master table:
Key 1


Related table:
1 Key 1
2 Key 1
3 Key 1


jamo

View 2 Replies View Related

Modules & VBA :: Add Values To Related Table?

Mar 27, 2014

I have two related tables. (related with AcqID)

tblAcq and tblAcqDetail
In tblAcq I have information about the delivery and in tblAcqDetail delivered articles, price and quantity.
tblAcq
[AcqID] ; [Contractor]; [TransportCosts]; [CustomDuties]; [SumWithoutVAT]; [LimSUM](this total cost of shipment Goods+other cost)

[Code].....

View 4 Replies View Related

Alternate And Related Parts From 1 Table

Aug 2, 2012

I have a table with an ID and PartNumber field.

Parts tbl
PartNumID PK(Auto)

PartNumber

Heres some example data:
1 M24308/2-2F
2 M24308/4-2F
3 ORD9F0000
4 ORD9M0000
5 D90000VLO
6 D90000JOO

How would I design the table to allow me to define alternatepart numbers and also related parts? For example:

Record 1 is the primary part and record 3 is the alternatepart.
Record 2 is the primary part and record 4 is the alternatepart.
Records 5 and 6 are related parts to records 1, 2, 3 and 4.

I have a form that allows the user to select a part and displaythe part data. But I also want the alternate parts and related parts displayedon the form, maybe in a subform with tabs. I havent gotten there yet because Icant determine the table design.

View 3 Replies View Related

Update A Table In All Related Forms And Queries

Feb 15, 2007

I have created a database for storing, query and deleting data. Now the user wants to delete a row from a table and create two new rows. In my opinion this will need lots of work in order to replace all related queries forms and reports in the form. Is there any whay to do my job more easy in modifing a table and all related items be modified by themself? I still do not have any data in the table but if I did will I loose those data?
Thanks.

View 2 Replies View Related

Table Design Question -- Baseball Related

Jul 15, 2005

Hello,

I'm not sure why I'm drawing a blank but I am. Could I please get a few suggestions on how you might organize these fields into tables?

These are not baseball stats fields. I'm keeping track of how often teams win over the years. I would like to do generate a team webpages showing all historical wins, losses and championships.

TeamID
TeamName
Year
Wins
Losses
AL_DivisionChampion (3 divisions in each league EAST,WEST, CENTRAL)
NL_DivisionChampion (3 divisions in each league EAST,WEST, CENTRAL)
AL_WildcardChampion
NL_WildcardChampion
ALCS_Champion
NLCS_Champion
WorldSeriesChampion

Initially I thought about YES/NO fields but there are so many variables. I need to know STL won the division but also that it was the NL Central.

Any help would be greatly appreciated.

Thanks
Rob

View 7 Replies View Related

Querying Two Inter-related Field In A Table

Jun 16, 2005

Hi,

Need some help. Here's the problem:-

I've two fields in a table (A & B)

A B
1 Null
2 Null
3 1
4 2
5 3
6 5
7 Null
8 4
9 6

The fields are somehow related where values of B (unique) is taken from A(unique).
I trying to do an SQL such that if I input a single value A=9 or 6 or 5 or 3 or 1, the following should be the output:

A B
9 6
6 5
5 3
3 1
1 Null

Or in another case where I input a single value A=8 or 4 or 2
the following should be the output:

A B
8 4
4 2
2 Null

How can I do that? Many thanks in advance!! :D

View 3 Replies View Related

Show All Records That Have More Than One Matching In A Related Table

Dec 16, 2005

Hi,
I've been trying to get this for ages now - both in the design view and in sql:

I have 2 tables - one called DrawingsRegister and a related one called DrawingRevisions. Each drawing has one or more drawing revisions. I want a query that will show each drawing (just once) that has more than one revision:


SELECT tblDrawingsRegister.DrawingNum, tblDrawingsRegister.DrawingName, tblDrawingRevisions.DrawingNum

FROM tblDrawingsRegister INNER JOIN tblDrawingRevisions ON tblDrawingsRegister.DrawingNum = tblDrawingRevisions.DrawingNum

WHERE ((Count([tblDrawingRevisions]![DrawingNum])>"0"));

Thanks for your time,
RCurtin.

View 1 Replies View Related

Queries :: Query Using Criteria From Non-related Table?

May 15, 2015

I want a query selecting records from table1 based upon a value in table2 -

table1 contains thousands of records - fields include VendorNo and VendorName

table2 contains a single record - fields include VendorSearchName (which is a "short name")

I am trying to create a query which lists all VendorNo and VendorName entries where VendorName contains VendorSearchName

eg. VendorSearchName = "Fred" will list VendorNames including "Fred Flinstone", "Big Fred" etc

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved