Linked Table Relationship Help Needed
Nov 30, 2005
I have a database that has a linked table within it. I need to enforce referential integrity on this relationship but it won't allow me too.
Does anyone know if this can be done?
If so, could you possibly point me in the right direction
Thanks
View Replies
ADVERTISEMENT
Dec 16, 2004
There has to be an easy answer to my problem, but I give up. I'm pretty much a novice trying to modify what seems to be a fairly complicated database. Here goes.
The format for all of the database tables are stored in a master database and linked to the database (user database) with all of the forms, queries, etc. I am trying to add fields to one of the tables. I added the fields in the master database, made a new linked table in the user database, and created the links in the master database. My problem seems to occur with the relationships for the user database. When I create the relationships, the check boxes to enforce referential integrity, etc are shaded and cannot be checked. I am working from a copy of the database so that I can compare to the original that works. In the original database, all three boxes (enforce referential integrity, etc) are check in the master database and in the user database only enforce referential integrity is checked. In the user database, the relationship type is "One to Many - External." It SEEMS that my problem is that I can't check the "Enforce Referential Integrity" box for my relationship. Also, I don't know how to get "One to Many-External" to appear. Mine just shows "One to Many."
The error caused by my problem is as follows:
I have a subform where a combo box is used to populate a field. The source items for the combo box appear properly, but when I try to select an item input after I modified the linked table, I get the following error "You cannot add or change a record because a related record is required in Table xx." Everything I can find indicates this is a relationship problem. Interestingly enough, if I select an item that I input prior to change the table, it is accepted and input without error.
I know this is long, but I don't know how else to explain the problem.
Thanks
View 7 Replies
View Related
Jun 5, 2006
ok, let me please ask this question regarding a payment relationship in my database
it will be paid in four ways, cash, creditcard, cheque, paypal
each of these payment types will have their own features..
eg creditcard (name on card, card number)
cheque (cheque date, date cleared)
paypal (username...YOU GET THE PICTURE
so is this below way a good way to store these details, or can i do it with 4 less tables..
http://bb.1asphost.com/antonyx6/untitled2.jpg
if this way is correct, i dont see how each id will be entered..
eg
if i enter some cheque details.. will that lead the chequeid to be linked to the paymentid, and the paymentid to the bookingid, and the bookingid to the booking details etc
View 5 Replies
View Related
Nov 6, 2007
I've completed the Relationships on my online store project database and put the tables into a word doc so everyone can view
Does everyone think they look ok? If not, all opinions are welcome!
I've also 2 questions:
1) Should I create a seperate table for Usernames & Passwords?
2) Should I make the CD, DVD & Games table in a single table?
View 5 Replies
View Related
Apr 12, 2008
i have imported 5 excel files and linked to a query named stock.i have linked the code,description and quantity from each table (ms excel imported) to stock.
the problem is not all the codes available in the tables r available in stock.there r
more than 25000 codes but only 2614 r listed in stock.i dunno whether its the problem with the way i have linked.so if u can help me with the problem i will be really thankful.
5 excel sheets contains the code,description and qty of 5 shops.in the query stock contains 1st column-id,2nd column-code,3rd column-description and 4th,5th,6th,7th,8th column the qty from 5 excel sheets respectively.
View 3 Replies
View Related
Aug 31, 2007
I am trying to build a Form that will show an estimate (then eventually will be moved to a project if customer and employee aggree to price and project) in a Form F_Estimates is a M_Customers(Customer_ID) (Based on a Table) and thier info in a Subform. Also is the "projected costs" from parts out of the Parts(Part_ID) (Based on another Table) in a second Subform as a list that I need to calculate $$$ in
(Dang that still sounds evil and definately NOT understandable even after edit... so)
Here's some basic info
Tables
EstimatesandParts - Table
EstimatesandParts_ID : Autonumber
Estimate_ID : Number
Part_ID : Number
Parts - Table
Part_ID : Autonumber
PartNumber : Text (not a number due to some part#s have letters in them)
PartName : Text
Unit Price : Currency
Description : Text
Estimates - Table
Estimate_ID : Autonumber
InvoiceNumber : Text (again can have letters in it)
EstimateDate : Date/Time
EstimateTime : Date/Time
Employee_ID : Number
Customer_ID : Number
ProblemDescription : Memo
Customers - Table
Customer_ID : Autonumber
FirstName : Text
LastName : Text
CompanyName : Text
Address : Text
City : Text
Province_State : Text
Postal_ZIPCode : Text (CDN Postal codes are letter num letter...)
you can see the link table in the EstimatesandParts Table
Now I want to use that link to populate a subform in the F_Estimates form
Forms
SF_Customers - SubForm
(all boxes atm are text boxes on this form till I figure out the Parts section then will use same base for this so I can pick any customer in the database to be the customer for this estimate. Also will have ctrl button for making new customer with customer form and a refresh on Focus Gain bit of code)
FirstName
LastName
CompanyName
Address
City
Province_State
Postal_ZIPCode
SF_Parts - SubForm
Default View -Continuous Forms
(want it to be a list of parts that I can grab prices and descriptions from then in a bit of code to calculate a cost of parts)
Part_ID : Combo Box
Control Source - Part_ID
Row Source Type - Table/Query
Row Source - SELECT Parts.Part_ID, Parts.PartNumber, Parts.PartName, Parts.UnitPrice, Parts.Description FROM Parts ORDER BY Parts.Description;
(Pulls info from the table Parts for input into a list of parts to be used on that project)
PartName : Text Box
UnitPrice : Text Box
(here's where I run into problems due to the fact that the form is not based on the parts table but rather the link table EstimatesandParts so I can't propogate the info to the 2 other text boxes, ps I dont care if they cant be text boxes and have to be linked or some other type I'm not "set" just need to find out how to make it work )
(have tried a couple things to complete this task)
Me.txtPartName = Me.Part_ID.Column(2)
Me.txtUnitPrice = Me.Part_ID.Column(3)
(works AWSOME ... for ONE ROW then propogates the second selection to the first and second and third selection to first second and third and so on ...)
(tried to make control source for the txtPartName to)
=Forms!Parts!Partname
(Doesnt exist .. akkk, cant use ActiveForm either as it doesn't focus on the SubForm but the MainForm ... cry)
F_Estimates - Form
Estimate_ID
InvioceNumber
EstimateDate
EstimateTime
ProblemDescription
(all basic Text Boxes)
Employee_ID
Customer_ID
(Combo Boxes Select Customer and Employee from list of present ones of each)
SF_Customers
SF_Parts
(Both SubForms on the main form)
Now this is an Exerp from my entire Database I like to work on one small problem at a time and I have made this its own little database till I figure out the problem then I will bring the info I learn back into the rest of the database and go from there ...
Hope you can help I have a feeling I will need to make a recordset and go from there but I'm just not able to wrap my head around that for some reason
Thanks in advance for ANY and ALL help that I get from here
View 10 Replies
View Related
Oct 4, 2005
Hi,
I have an Access 2000 database with some linked tables. When upsizing the database I selected 'Save password and user ID with attached tables'.
Therefore in the Linked Table manager after each table in brackets I have the name of the database to which the tables are linked.
I am now wondering if I want to link the tables to a different database how do I change the database name, which is in brackets after the table name.
If I select a table and select 'prompt for a new location each time' I am getting prompted to select a different DSN. At the moment I don't have a DSN and I don't want to have to set one up.
I imagine that the database name and the user id and password I entered in the upsizing wizard are stored in some configuration box but I don't know where I can access this.
Can anyone point me in the right direction??
Thanks
View 4 Replies
View Related
Jun 6, 2006
I need urgent help, I am required at my job to come up with a command that will check to see if a table exists, and if so, delete the table. The whole process goes like this:
There's a form, and a listbox. 2 buttons...1 is import a file and 2nd is generate report. In the listbox theres 3 excel files. You select one excel file then click on Import, followed by clicking on Generate Report button.
The whole technical process is this:
1. A csv file is imported into a temp table
2. A temp table is created and named "_ImportedSKUS".
3. An append query is exectued to add the data from the "_ImportedSKUS" temp table to the final table, "Imported SKUs".
4. Then the temp table, "_ImportedSKUs" is closed and deleted.
I have a delete command at the end of the sub, which goes like this:
DoCmd.DeleteObject acTable, "_ImportedSKUS".
But I'm also need to generate an If statement before the loop that will check to see if the "_ImportedSKUs" table exists, if so, delete it (using same code listed above) and end if.
Can anyone help me out here???
View 4 Replies
View Related
May 31, 2005
I've got a problem with a make-table query that creates a new table which is then populated with new values that relate back to the original table the trouble is the make-table won't run with that relationship in place.
Is there a way to delete the relationship then reinstate it after the query? or any other way round that someone can think of.
Thank You
View 1 Replies
View Related
Jun 6, 2005
How can I have table data refer to other data in the same table? For example: If I have a table of people I know, and I want to 'link' family members together, and these other family members are also listed in the table of people I know.
Table: People
Field#1: PersonID
Field#2: PersonName
Field#3: FamilyMember1 (using the PersonID)
Field#4: FamilyMember2 (using the PersonID)
I hope I've explained myself clearly.
Thanks for any help.
-E
View 10 Replies
View Related
Aug 29, 2006
Hi, I have 2 related. In the first table I have a primary key number and another ID number.
On the 2nd table which is related by the PrimKey I want the ID number to come up automatically. I can't remember how to do this. Can anyone help?
thanks
View 2 Replies
View Related
Feb 1, 2007
Hey guys
Access rookie here (and I mean ROOKIE).
I have two tables.
One with details of people's information (mothers).
We also need to enter information for their babies.
Basically I have set up a form with the info for the mother's details, and she has a Mother ID. The baby also has an ID which should be the same as the mothers (linking the two tables).
When I enter the info into the form for the mothers details, I hit the command button that opens the baby's details, however it has not created a baby ID that is the same as the mother's ID, therefore there is no relationship. If I enter in the baby id, and fill out the form - I goto the table and see that it has made the link and the information is complete. However, I don't want to have to enter the ID each time.....I just want the mother's ID to carry accross to the baby's ID field, hence linking the two.
Why isn't this working?
Thanks for your help!
Ryn
View 1 Replies
View Related
Mar 7, 2007
Hi there,
Hope you can help...
I am having problems with a current database i have designed which was initally for Products/Stock. I now want to intergrate Services into the equation. I have attached a proposed design, but whenever i add the Services table and relationship, everything, in the sense of data disappears.
I can upload my Database if needs be.
Thanks,
Jon
View 5 Replies
View Related
Jul 19, 2007
I'm having trouble modeling a relationship in a database. I need conceptual help. Here is an abstract description: A Class has several common attributes, but there are some attributes that differentiate different instances of this Class. For example, this Class may have x fields. ClassB will have those same fields and several others, so Class B will have (x+y) fields. Class C will also have x fields and an additonal Z fields for a total of (x+z) fields. x and y may be the same number or not, but they will certainly not be the same type of fields. See attached for picture.
My thinking is that since all the classes have x fields in common, why not have super class in its own table (ClassA), and have two (or more) tables composed of y and z fields respectively. The primary key (A1, lets say autonumbered) in the ClassA table would also be the primary key in ClassB and ClassC tables.
My goal is is have a subform within a form, where the form has all the fields from ClassA and the subform will have all the fields from either ClassB or ClassC depending on another field in ClassA (A2, text type for example). In essence, the layout of the subform would change depending on the value of A2 from the ClassA table.
Can this even be done. I think I'm missing something here. Would anyone care to offer advice?
View 3 Replies
View Related
Feb 19, 2008
Hi, I have these two tables
horse_entries
ent_HorseName (PK)
ent_entries
horse_information
inf_HorseName
inf_Ground
inf_Notes
I have no records in horse_information yet. I need it so that when a record is added to the first table then whatever is added to ent_HorseName is added to inf_HorseName. So I want all the records from horse_entries in horse_information. I want to be able to add to horse_information without that record being added to horse_entries. What kind of relationship should I use. Thanks
View 3 Replies
View Related
Sep 30, 2004
I have a form to insert data into the table1 of the db.mdb file.
In db.mdb file I have two tables one is table1 and other is table2 now the fields in both table are as follow
Table1
ID (AutoNumber)
Name (Text)
Roll No. (Number)
Class (Text)
Address (Text)
Result (Text)
Table2
ID (AutoNumber)
Roll No. (Text)
Result (Text)
Now I want that whenever that data is posted into table1 then table2 should autoupdate the corresponding data.
Please guide me how this is possible?
With Regards.
View 5 Replies
View Related
May 19, 2005
Hi Everyone, I need help in selection of primary key and designing of a tables. I am having a table called Current trailers with Trailer number as a primary key. I have similar table to current trailers called history table in which the trailers that left the yard are stored. As a trailer can enter and exit the yard couple of times in a week, its not letting me to have duplicates in the history table.So can anyone help in selection of primary key for the history table. Or can anyone tell me how I can have duplicates in a table.
Thanks in Advance,
Naveen
View 2 Replies
View Related
Apr 24, 2006
I’m having trouble defining Relationships I’m thinking I need a “Junction” Table and I have tried looking at the Orders.mdb but it hasn’t helped (I’m sure I’m just missing something) I just don’t see how it works. If at all possible please don’t just give the info try to help me understand so I can get the answer myself.
Here is what I have:
Far table:
FarNumID (PK) > autonumber
FarNumber > Text “224-10C”
FarTitle> Text
FarParagraph table:
FarParaID (PK) > autonumber
FarNumID > Number
FarParaTitle > Text
FarParaText > Text
AC table:
ACNumID (PK) > autonumber
ACNumber > Text
ACTitle> Text
ACParagraph table:
ACParaID (PK) > autonumber
ACNumID > Number
ACParaTitle > Text
ACParaText > Text
1. Each FarNumber can have only 1 FarTitle 1:1
Each FarNumber can have many FarParaTitles 1:Many
Each FarNumber can have many FarParaText 1:Many
2. Each FarTitle can have many FarParaTitle 1:Many
Each FarTitle can have many FarParaText 1:Many
3. Each FarParaTitle and have only 1 FarparaText 1:1
Thanks so much.
View 4 Replies
View Related
Oct 30, 2006
I am looking to set up tables in such a way that will allow for the concept:
If Variable 1=A and Variable 2=B then Output of 3=C
For Example:
If the House is "Blue"
And the Man drinks "Beer"
Then his pet is a "Dog"
If the House is "Green"
And the Man drinks "Vodka"
Then his pet is a "Bird"
NOTE:
There is no equational relationship between the first two variables to get the 3rd output. It is simply a lookup table. In excel you would have the color house down the left, the drink across the top and in the cells would be the type of pet. But I am struggling with how this can be made to function within Access since I will want the user to obviously be able to pick the first two variables and have the "answer" spit out.
View 2 Replies
View Related
Mar 14, 2007
Hi
I will give you an overview of what I have.
I have a database that records sites in Blackburn and each site has a unique ID (RTP_ID). Each site has 10 objectives with 25 Measures in which the sites are scored against.
Objective 1 has 2 measures
Objective 2 has 8 measures
Objective 3 has 1 measure
Objective 4 has 1 measure
Objective 5 has 1 measure
Objective 6 has 3 measures
Objective 7 has 2 measures
Objective 8 has 1 measure
Objective 9 has 2 measures
Objective 10 has 3 measures
Each site has the same objectives and the same measures, but the scores for each are individual.
Table: SiteDetails
RTP_ID, SiteName, Postcode
Table: Objectives
OBJ_ID, ObjName, ObjScore, RTP_ID
Table: Measures
OBJ_ID, MSR_ID, MsrName, MsrWeight, MsrScore
I don't know how to create the relationship between them so that each site can have 10 objectives and 25 measures (with scores) individually. At the moment, I have them connecting as SiteDetails.RTP_ID > Objectives.RTP_ID and Objectives.OBJ_ID > Measures.OBJ_ID but it doesn't work, it thinks that the scores apply to every site.
Please help me, I know that this may not make sense without seeing the database, but unfortunately it is too large to attach.
View 4 Replies
View Related
Nov 4, 2006
I have almost finished my current database but I was asked to create a log table/log file that would list changes made to every record. Now my current database don't allow duplicate records, so any advice pointing me into the right direction will be helpful. I have ran through the search area and found nothing that I can use. Can any one help me out in this specific problem. I picked up a few books and none of them give examples of such things. Thanking you all in advance...
View 14 Replies
View Related
Sep 18, 2005
I am looking for an easier way to confirm that all a queries that are in a database are being used by the database. I started going through each and every one and it is taking for ever!
I have tried the documenter and either I cannot understand it properly or it does not contain the information that I am looking for.
An example might be I have a query called qryOne. I want to see where it is being used so I am looking for a “list” that says
qryOne = rptOne
qryOne = rptSix
qryOne = rptEightySix
Obviously these are just made up names, but I hope you understand what I am looking for. In essence a relationship table for queries, forms and reports.
Thanks for your help
View 3 Replies
View Related
Aug 2, 2006
I was hoping to get pointed in the direction of some relationship theory. I am new at this and was wondering when, where and how to implement relationships into a DB. I am sure this has a lot of good uses, but I am failing to understand it completely. Any and all help is appreciated.
thanks
Riley
View 2 Replies
View Related
Mar 27, 2005
I have two tables, table 1 with client contact data and table 2 with client needs, both are auto numbered. I have two fields that are titled LastName & FirstName that appear in both tables. When I enter a new client in table 1 I want table 2 to automatically be updated with the clients first and last name. For example: If both tables have 4 records and I enter a new client in table 1 I want table 2 to be updated with the new client first and last name information,so both tables would now have 5 records. How do I create this relationship? Any help would be appreciated. If I haven't explained this well please let me know. Thanks. :confused:
View 3 Replies
View Related
Sep 14, 2005
I am working on this database where each category contains certain thickness ranges that can be stored in a pack of x amount and finally paneltypes.
ie KS1000 only comes in 40mm 50mm 75mm and paneltype MR is the one associated with it.
there are 3 tables
tbl_Customer
tbl_catergory
tbl_product
--------------------
tbl_Customer:
-CustomerID (autonumber) Primary key
-CompName
-CompAddr
-ContactFName
-ContactSName
---------------------
tbl_category:
-CategoryID (autonumber) Primary key
-Category (combo box) this has set values entered i.e.
KS600
KS900
KS1000
KS1000LP
KS1000RW
------------------
tbl_Product:
-ProductID Primary key (autonumber)
-fkeyCategoryID (foreign primary key)
-Thickness (combo) this has set values of thickness ie. 40, 50, 55, 60, 70, 80, 100, 150, 180
-NoInPack (set number directly related to the Category and thickness chosen)
i.e. Category KS1000 with thicknesses of 55 can be stored in a pack of 17. KS1000 with thickness of 60 can be stored in a pack of 22.
-PanelType: (combo box) set values as follows:
MR (this selected item relates to products KS600 KS900 KS1000 )
EB (this selected item relates to product KS1000RW )
CX (this selected item relates to product KS1000 )
MM (this selected item relates to product KS1000 )
WV (this selected item relates to product KS1000 )
---------------
I would like to be able to setup a form that a user uses to provide a quote:
It would start with using the Category combo box which lets you select one of the choices (i.e. KS1000) but the combo box would also have multiple column headings ie. Category/Thickness/NoInPack. Once selected then the next several individual field boxes (ie. thickness, NoInPack) are automaticallly populated with the selection just made in the Category combo box.
NOTE: Many categories can be chosen just for one record.
I therefore do not want to start setting up fields like Product1 product 2 etc and their associated fields like thickness1, thickness2 etc.
I'm failing in the relationships section. Please see attached database.
I have tbl_category: CategoryID (1) --------> (many)fkeyCategoryID from tbl_Product
I have tbl_Product: ProductID (1) -------->(many) CustomerID from tbl_customer
I know that i need a junction table somewhere.... but i'm a newbie when it comes to this stuff.
Any help would be appreciated.
View 8 Replies
View Related
Mar 27, 2006
Hi,
I'm making a database of spare parts for machinery.
But I came upon the following problem :
A part can sometimes be used is more that 1 machinery.
But I do not understand how I put the ID of all the machines in 1 field of that spare part
example : spare partes :
- ID
- name
- machines
How do I solve this problem the best way?
TIA!
View 7 Replies
View Related