Multiple Relationship Subform

May 7, 2006

Hi. can anyone help me. I've spent the last two hours getting no where.

I have a tbl_Enquiry,tbl_EnquiryType and tbl_Questions
On the main form (frm_Enquiry), depending on which enquiry type is chosen, will depend on which questions are displayed.
this is a many to many relationship so I have a junction table, called tbl_TypeQuestionJunction.

The questions are displayed in a sub from when the enquiry type is selected, and this all works fine.

However, I then need to add a field where the user can write thier answers to the questions.
for this I have a table tbl_QAJunction with the fields
EnquiryID
QuestionID and
Answer

How can I get my subform to display the correct questions when the enquiry type is selected, with an answer box next to it and then pick up the EnquiryID, QuestionID and the answer and add them to the tbl_QAJunction.
I just can't get a query to work.

I hope this makes sense

This has really bugged me and is stopping me completing my database.
Am i going abotu this all wrong? If anyone can help, I'd be grateful
I've attached a cut down version of the DB so you can see what i'm on about

Thanks

View Replies


ADVERTISEMENT

Relationship Btw Form And Subform

Jan 25, 2008

Hi,

I have a main form (stud_details) also I have a subform called (pay_det_sub).The subform is displayed on the main form.
I want to create a relationship between the stud_details and pay_det_sub, with the aid of a field on the stud_details called numhus (which is the primary key).

So that when a student with a specific numhus value is displayed it brings about the payers details on the subform.

What's the best way of doing it??? Is it necessary to have numhus value stored also in the subform table to create a relationship....

Thanks

View 3 Replies View Related

Multiple To 1 Relationship In A Table?

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

Multiple Field Relationship

May 3, 2007

I am trying to conduct a query that is based on two separate queries. Is there a way to that the queries can be related based on multiple fields?

View 1 Replies View Related

Relationship Between Multiple Tables

Dec 10, 2012

I have to make a database for my class project, and I am having problems with the relationship between tables. I have these tables:

Application
advertisement
employment agency
listed position

In the advertisement table I already linked listed position and employment agency. It shows the position name from the position table and in the agency column shows the agency name. When I link the application table to advertisement table and select position and employment agency column, it just shows up as the id numbers in the application table. How can I have it show "engineering| we find you jobs" for the table?

View 4 Replies View Related

Querying A SubForm With A MANY To MANY Relationship With MainForm

Jul 5, 2005

Hi,

I am assuming Access cannot handle Many to Many relationships very well.

I have an Account form ("MainForm") with an embedded SubForm that displays only the Account Address with suite number, street number, street name, street type. Account to Address is a Many to Many relationship. My Account form's source is tblAccount, and the SubForm is built off of a query of 3 tables -- Querying Account, LinkTable, and Address table. The link between the SubForm and the "MainForm" is done via AccountID.

My problem is, when I query for an Address (say entering a street number of 25), I want to get back all the addresses with street number of 25 AND the corresponding Accounts that have street number 25 only

What it does is return the addresses with Street Number 25 and ALL the accounts regardless of what their addresses are!

Is there a way to do this?? Can I design a form without using a SubForm in this case, ie, display the account and its many addresses? Or does Access Forms not support Many to Many Relationships? I'm thinking the link table is causing the problems here.

Please advise -- this "simple" project is becoming quite the headache! :eek:

"edit" -- I also notice this problem with a 1 to Many relationship (the "many" portion being the subform)

Thanks for any help,

Mike

View 3 Replies View Related

Leaving Subform Error With Relationship

Feb 27, 2006

Hey guy im kinda new to this program so excuse me if my question is simplistic:I built a form for making Purchase orders. In the main form...a user enters a bunch of text/num info (name, address, ect)into the table. After that i have it tab to a subform..where a user can add items by line (as many as they like). All good till here: Once i go to click out of the subform...i get message "You cannot add or change a record b/c a related record is required in table 'UCT_Req'"My relationship has a 'one-to-many' link (the req number to the many line items). I have auto-numbers counting up in each table.My main problem seems to be attaching the entered line items to a specific record in the main Purchase order form...and then opening a fresh form afterwards. Any hints?Thanks folksSTeve

View 2 Replies View Related

Forms :: Subform Relationship With New Entry

Mar 28, 2014

I have a Workorder Form that holds all the fields that apply to the entire project (payment, customer, etc).

Then I have a subform for Stock. This allows there to be several different stock items (and production information relevant to that stock) assigned to a Workorder.

I have successfully linked the two so that when a Workorder is opened, it shows any related Stock in the subform that has already been created.

The problem is new stock entries. I need it to only allow Stock additions to the current open related Workorder.

I currently have it where you can type in the WorkorderID (autonumber) on the Stock subform new entry and it will work. But I do not trust employees to type in the correct number every time they need to add stock to a Workorder. I can't release it this way.

I mean, the whole point is for the database to promote as little error as possible, right?

View 5 Replies View Related

Trouble Establishing A Subform Connection (relationship)

Feb 20, 2006

I am having trouble establishing a subform connection (relationship) to a main form. I am using Access 2003.

I am creating a medical record database where I already have one form / subform relationship established that works. However, I created another form where I want to indicate the Physician(s) information within the main form and his specialties within a subform. I need to use the subform because one physician can have more than one specialty.

My fields within two tables are:
Doctor (Table)
ID
Doctor First Name (Key)
Doctor Last Name (Key)
Doctor Address
Doctor City
Doctor State
Specialty (Related Field)

Doctor Specialty (Table)
ID (Key)
Doctor First Name
Doctor Last Name
Specialty (Related Field)

The problem
I can’t establish the relationship.:confused: Also, when I look at my relation diagram – does each table have to relate to another? Can I have two separate relationships indicated?

View 5 Replies View Related

Forms :: Create Relationship Between Subform And A Table?

Mar 27, 2014

Is it possible to create a relationship between subform and a table?

View 1 Replies View Related

Create Query With Multiple Criteria From A Many To Many Relationship

Sep 23, 2004

Alright I've been picking my brain for the past hour trying to figure this one out...

I have 3 tables...
1) Retailers-RetailerID, RetailerName, address etc. (500 entries)
2) Distributors- DistributorID, DistName (10 entries)
3) Uses- RetailerID, DistributorID

Sample data is as follows for 'Uses' table:
RetailerID DistributorID
1 1
1 3
2 1
2 6
3 4
3 5
4 8

I am trying to create a search form based on a query which will return retailer information for those retailer who use multiple distributors.

For Example...There will be 2 text boxes and a user can enter a distributorID in these text boxes. If only 1 distributorID is entered, it will display records for that one.

I have tried the following but I have been unsuccessful:

SELECT Uses.RetailerID, Retailers.Address, Count(Uses.RetailerID) AS CountOfDistributorID
FROM Retailers INNER JOIN (Distributor INNER JOIN Uses ON Distributor.DistributorID = Uses.DistributorID) ON Retailers.RetailerID = Uses.RetailerID
WHERE Uses.DistributorID = 1
GROUP BY Uses.RetailerID, Retailers.Address
HAVING Count(Uses.RetailerID) > 1


Is this possible to accomplish with the way I designed this database? If so, can I get a little advice? I know this is a long question that can't be answered in full but I would just need to basics in order to be on my way.
Thanks in advance!

View 1 Replies View Related

Multiple Field Line Relationship In Access

Jun 29, 2015

Why and where do we create a multiple field relationship in Microsoft access.

The relationship between CompanyContacts and CompanyProducts.(Adopted from Microsoft access 2013 inside out by John Viescas).

What was the main purpose of using such a relationship here and where are such relationships frequently created.

View 7 Replies View Related

Create Relationship Between Multiple Field Primary Key And Another Table?

Aug 4, 2015

In table 1 fields Factor, Aggregations, Stat, and Days Back are fields that make up a multi-field primary key [URL].

I want to create a relationship between that multi-field primary key and another table, call it table 2, and make it a one-to-one relationship.

How do I do this in MS Access 2013?

View 3 Replies View Related

Forms :: Subform To Popup Relationship And With Refresh Of Calculated Field

Apr 3, 2014

I have a "Main" form called frmProjects that sports multiple tabs. One of those tabs is labelled "Milestones", into which I inserted a datasheet subform called frmSubMilestones. The table that feeds the subform is tblMilestones. I established the parent / child relationship between frmProject and frmSubMilestones, and everything is working just fine...

To summarize: frmProject as main form -> Milestones Tab on main form -> frmSubMilestones as datasheet subform on the Milestones Tab (there are other tabs that are not subforms).

I have been asked, for each milestone in the frmSubMilestones subform's datasheet, to capture the number of days spent by employees on a monthly basis. The Milestones table and the PersonDays table have a primary key and a foreign key that are similar.

To summarize: frmSubMilestones as subform -> txtAggregatePersonDays as calculated Textbox fetching data from tblPersonDays -> OnClick event -> FormLoad of frmPersonDays as datasheet PopUp form.

DoCmd.FormLoad is supplied with the usual parameters to make the PopUp form appear, filtered on the currently highlighted milestone. Everything works fine so far... well almost.

Problem 1: When I introduce new rows in the frmPersonsDays datasheet, everything seems fine at the surface, BUT the primary key of the calling form (i.e. frmSubMilestones) does not appear in the tblPersonDays table; this is normal because there is no form-based parent / child relationship between the two forms. As one might expect, I am trying, from frmPersonDays, to get the primary key value from the "parent" frmSubMilestones using the Forms collection. No dice. I surfed and surfed, tried the bang and the dot operators, drank scotch, but nothing worked. I had to add foreing keys manually in tblPersonDays to further my tests. I can't figure out how to reach any control on the calling form, which is a subform.

Problem 2: The calculated txtAggregatePersonDays on the frmSubMilestones works wonders for existing data in tblPersonDays. However, when I introduce new rows in the PopUp form, I also realized that the calculated Textbox in frmSubMilestones is not updated when I close the frmPersonDays PopUp. I have to close the PopUp form and move the cursor in the Main form (frmProjects) to refresh its associated milestones.

View 3 Replies View Related

Forms :: Navigation Combobox Ignoring Subform Master-child Relationship?

Jun 17, 2015

I have a form, frmProjects, with a continuous subform, sfrPeopleOnThisProject. They have a master-child relationship. The form shows one Project record at a time, while the subform shows all the People records for that project. This works as expected - the correct records show up in the subform as you move through the form records.

To make it easier to glance through the list of subform records (as they can sometimes be quite long), I've added a navigation combobox to the header of the subform. If I understand correctly, as the combobox is within the subform, it should obey the master-child relationship: it should only show the subform records associated with the main form's current record. It does not. Instead, the combo box collects *all* of the records from the table that the subform is based on. So, choose the record for Project 1 in the main form. Up pops the 2 people on Project 1, but the combo box lists both the 2 people on Project 1 and the 3 people on Project 2.

The row source for the subform combo box is:

SELECT tblPersonOnProject.PersonOnProjectID, tblPerson.Fullname FROM tblPersonOnProject INNER JOIN tblPerson ON tblPersonOnProject.PersonFK=tblPerson.PersonID ORDER BY Fullname;

I can make the combo box perform as required by adding "WHERE Project=Forms!frmProject!ProjectID" to the row source and placing a hidden textbox on the main form for ProjectID (the autogenerated primary key) to sit. Have I misunderstood the point of the master-child relationship in the subform? This hidden textbox thing can't be correct.

View 2 Replies View Related

Subform And Multiple Select

Jul 5, 2005

Hello there everyone

Forgive me for being a muppet: I have been searching through the forums over the past few days but am not quite sure exactly what I need. I am a newbie at access programming so any advice (preferably in language a 3 year old would understand!) would be a massive help.

Here is a little background - I am knocking up a parts database for a vehicle my company specialises in that contains suppliers along with prices for each part.

Here is my problem: I have a Parts table, a Suppliers table and an AvailableSuppliers table (because some parts are available from more than one supplier and suppliers offer more than one part - 'AvailableSuppliers' is my junction table with foreign keys to thePartID and the SupplierID).
I would like, in my 'Parts Entry' form, to have a subform where the user can choose the different Suppliers a certain part is available from (I'd hope to store the different prices as well), and to store it in the AvailableSuppliers junction table. (Is this right so far?). I'd envisage some kind of select box where I can tick from my list of Suppliers who offers the part for sale.

Am I barking up the right tree? Am I on the right track so far?

View 1 Replies View Related

Multiple Item Subform?

Nov 6, 2004

I am creating a form that will require entry of first names, last names, and ID's of either none, or any number up to 15 people involved in a particular project. I am trying to accomplish this with a subform that links to the main form using the main forms primary key.

When done, you will be able to enter data into the record (project name, date, etc), go to the subform and enter the Primary Key (an AutoNumber), then the 0-15 names & ID's into the subform one netry at a time, with all entries linked via the primary key to that particular record. One problem is that the subform always displays the info for the previous records. I also want to be able to "get out" of the subform and back to the main form saving all subform data along with that record. (am I making sense?) and have the subform reset back to blank for the next record. I am completely lost and don't even know if I am approaching this in the right way. Any help would be greatly appreciated!!

View 1 Replies View Related

Multiple Printing When Using Subform

Jan 8, 2008

While using a relational database in Access 2003, I am writing a letter to people, reminding them what resources they have been allocated. The short letter is in a form and a subform has been used to list the resources - between 1 and 5 lines.

If I isolate one person by filtering, I get x identical pages, where x = the number of resources that have been allocated to them. Therefore, some people get one page, others could get 5 identical pages.

Can anyone advise how I can just show and print one page per person, irrespective of the number of resources allocated to them? I can get the correct result in a report but need it in a form so that the users can edit and select the letters to be printed easily.

Many thanks.

View 5 Replies View Related

Preventing Multiple Entry In Subform

May 4, 2005

Hi
I have a form and sub form, the sub form is populated from a query and has a column of checkboxes. Basically these checkboxes get checked as part of the form, but only a maximum of five are allowed to be checked. Is there a way of achieving this?
Cheers
Dan

View 1 Replies View Related

Update Multiple Records In Subform

Aug 11, 2005

Hoping that this is a simple problem :confused:

I have an orders form and subform, ie one order can have several product records with the following firlds
Product
Ordered
Received
At the bottom I have a command button 'ReceiveOrder'
What I want is on click of this button that the received field (that is 0 by default) will equal Ordered.
ie If I had orderd 2 and I hit the button it would change the recieved to 2 as well.
This much I have done with the following code
Private Sub ReceiveButton_Click()
Me.frmReceivingSubform.Form!QtyReceived = Me.frmReceivingSubform.Form!QtyOrdered
End Sub

This work fine if there is only one product, but if I have more than one it will only update the selected record, is there an ammendment I can do that means all the product records on that particular order will update.

I've searched the forum for the answers but can't find the answer, can anyone help,
Thanks

View 6 Replies View Related

Data From Multiple Tables In One Subform?

Oct 5, 2006

Hi!

First of all, I'm kind of a newbie to all of this, but not entirely, bare this in mind please ;-) Also I'm from the Netherlands and my english might be a bit rusty, so bear with me if you please.... :-)

I'm having a problem for which I cannot seem to find a solution. Below I've outlined the situation:

I have a couple of tables up to now:

CustomerTable
CaseDateTimeTable
CaseTechInfoTable

CustomerTable has got a primary key: Clientnumber
CaseDateTimeTable has primary key: Casenumber
CaseTechInfoTable has no primary keys.

CustomerTable only includes (apart from all adress info etc) the clientnumber field which is of importance in this case i think.
CaseDateTimeTable includes both Casenumber and clientnumber.
CaseTechInfoTable also includes both Casenumber and clientnumber. Only both other tables have Primary keys, and this one doesn't.

I've created a relation between CustomerTable - Clientnumber and CaseDateTimeTable - Clientnumber.
Another relation I've made is between CaseDateTimeTable - casenumber and CaseTechInfo - casenumber.

Now, I have made a form in which the name and adress data is fed into the database, in normal form view. Below these textboxes etc. I've created a SubForm in datasheet view in which the existing cases from the at that time selected/displayed customer should be displayed. At the moment only fields from the CaseDateTimeTable can be displayed, but I would also like to display some fields from, for example, CaseTechInfoTable in that same subform.

But how?

When I create a (sub)form via the wizard and for example select:
CaseDateTimeTable - clientnumber
CaseDateTimeTable - Casenumber
CaseTechInfoTable - Problem description

and display these fields in the subform as a datasheet, then the separate cases from each customer are not displayed. I have 5 clients in my test dbase, just about all of them have 2 or 3 cases associated with them. In the example above only the data from two clients is displayed and then only from 1 case each, not the actual amount of cases. So for example:

clientnumber 4 has casenumber 5 and casenumber 6. But only casenumber 5 is displayed. The same happens for clientnumber 2, he has casenumbers 9 and 3 but only casenumber 9 is displayed.

The strange thing is though, that when I create the same (sub)form in datasheet view, but only use fields from the CaseDateTimeTable all cases per client are nicely displayed in the subform.

Why? And how do I solve this problem? I need to solve it so that I can add data from other tables into the subform later on so a nice overview of certain important data can be given per customer per case, even before the case form(s) is/are opened.

I've tried making a query and base a form on that, but for some reason I can't get the query to display all my customers, let alone all cases associated per customer. In the past I have made another (smaller and simpler) database for which I also made a lot of queries. But now? Pff... I'm lost at the moment.

Anyone?

View 1 Replies View Related

Link Multiple Fields From A Subform

Dec 1, 2006

Good Afternoon to all...
I am looking to link more than one field from my subform to my main form. I have one field linked by properties (link child field/link master field). Is there a simple way to link another field from my subform to my main form?
Please Help??? Cori

View 5 Replies View Related

Multiple Records From A Form / Subform

Jun 1, 2012

I am currently building a database with the purpose of capturing data about various employees' skills. The idea is that a supervisor can fill out a questionnaire of sorts, with this employee, and give them a rating out of 5 for each skill. I have been working on this for a few days, and I am most certainly not an Access genius, so I have come to a bit of a wall. I know where I want to get, but I don't know how or if it is even possible, to get there.

I want to have a form that has all the questions on it, so each time the supervisor pulls it up they can just tab through and fill out the form. I have a main form with a subform, although this isn't ideal, it is the only way I can think of to even get close to what I am looking for. The main form portion, after a bit of testing, seems to be producing the desired results I am looking for in populating the specified table, but my subform (questionnaire) is just not doing what I had hoped. I know some of my formatting will change, but I just need a way to allow the supervisors to fill out the questionnaire, hit a button that adds all of the information in both the mainform and subform to their respective table(s) (which I know will require multiple records-1 for each question), and then be able to produce reports by employee.

I want various text boxes to autofill with the questionnaire info, and then have a box for the supervisor to input the ratings. I have used a Dlookup for the default property in each of the question and description text boxes in the subform, so they will reference info from a questionnaire table.

Attached Database...

View 14 Replies View Related

Add Multiple Records To Same Table From Subform

Feb 7, 2013

I've only started using Access 2010 since the beginning of January and have googled almost every problem to date.

My db is used to show the status of material through a manufacturing process. We start with one slab of material which gets cut up in to many parts.

The db works so far however I've come to the conclusion that the date was not normalized correctly. So I've created the following tables to fix this.

I have two tables the first of which holds data on the slab we start with and the second shows the status of the parts it has been cut up into.

Table 1 has the following fields

Cast Number
P/O
UST Status
UST Comment

Table 2 has the following fields

Cast Number
Blade ID (which will be 1 to 32)
Status
Comment

I would like table one to be displayed on a form with all fields. Have table two as a subform on the main form. But here is where I get lost!

I need the subform to show 32 text boxes to represent each part. Have each box assigned a default blade ID (1 to 32). Then depending which of the 32 text boxes get used to update those multiple records within Table 2.

I did have 32 status fields for every part but realized that meany were left null. I'm using, Access 2010 with Win 7...

View 5 Replies View Related

Populate Subform/table With Multiple Records

Aug 5, 2005

I have the following tables:
tblProjects
ProjectsID (Primary key - exclusive)
ClientProjects
tblProjectsDetails
ProjectsDetailsID (Primary key)
ClientProjectsDetails (Secondary key)
tblQuotes
QuotesID (Primary key - exclusive)
ClientQuotes
Service
Rate
tblQuotesDetails
QuotesDetailsID (Primary key)
ClientQuotes (Secondary key)
Service
Rate

I have the following forms:
fmProjects
fmProjectsDetails (parent/child)
fmQuote
fmQuotesDetails (parent/child)


When I add a project I need to have data from the tblQuotes and tblQuotesDetails to populate tblProjects and tblProjectsDetails respectively.

It is very easy to populate tblProjects from tblQuotes since it is a single record. Therefore I use:
Me.ClientProjects = Me.ClientQuotes

:confused:
The question is: how to match the data of the 2 subforms? Since there will be more than one record per subform?

Any help is really appreciated.

View 2 Replies View Related

Passing Multiple ListBox Selections To Subform

Sep 21, 2005

Using Access 2003.

I will have a ListBox on the form with “Multi Select” set to either simple or extended. I have a collection of documents which must be recorded in a database. Some documents may have only one author, but could have more. Same with the recipient or copied-to.

Ideally it would be nice to have the ListBox on the left, selected one or more from the list and then pass them to one of the three fields by a command button, sort of like:

cmdAuthorAuthor1
LISTBOXcmdRecipientsRecipient1; Recipient2
cmdCopiedTo Copy1; Copy2; Copy3

I would like to have all of the names selected from the ListBox as a string, but fully understand the problems associated with normalization. Other posts have suggested subforms. So, the question is how to select from the ListBox and then pass the possible multiple selections to discrete fields on a subform that would display, say three fields and which would get away from the normalization issues:

cmdAuthor [Author1] [ ] [ ]
LISTBOXcmdRecipients [Recipient1] [Recipient2] [ ]
cmdCopiedTo [Copy1] [Copy2] [Copy3]

The secondary issue will be that there will be subsequent names which are not found until actually in the process of document review which will create a need to update the ListBox, which I know is not akin to a ComboBox NotInList function.

If there are any thoughts or coding out there which will help, it’d be appreciated.
Lawguy

View 1 Replies View Related







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