Working With Many To Many Relationships In Forms And SubForms?

Mar 18, 2015

With a many to many relationship using a junction table, do I have to manually plug in the ID numbers from the related tables in the junction table for it to recognize the related data? It sounds silly and obvious I guess that you would have to, but when I go to create a form based on a many to many relationship, I would like the ability to enter data without having to enter the related ID numbers in multiple places on the form or subforms to make it work. I guess I envisioned access using auto numbers to automatically update the junction when I wanted to add data related between the "main" table and the distant table joined with a junction. Can this be fixed using a Parent/Child relationship set-up in some fashion?

View Replies


ADVERTISEMENT

Forms :: Subforms And Many To Many Relationships - Data Not Retained

Jun 4, 2013

I have created a form with two subforms. The context of this is a litigation database. The main form is for testimony. Among other things, it includes a field for a question and an answer. Any given piece of testimony may relate to one or more documents, and any document may be referenced in one or more pieces of testimony. So have two subforms, one for documents produced by the Plaintiff, and one for documents produced by the Defendant. It worked out easier that way because I originally created indices of those documents in separate Excel tables which I then imported to Access.

So the relationship for both document tables relative to the testimony table is many to many, which is established using two junction tables.

I also have a combo box in each subform where I can autofill fields based on selection of the document number.

My problem is that while the combo-box works great, once I select a document in the subform, that selection is carried over into the next entry of the master form, but also the selection is not retained in any of the master forms. So I can browse the document listing from any entry in the master form, but I can't get the document selection in the subform to stick and create a lasting relationship to a given record in the master form.

Is my problem that it is just impossible to have a subform based on a many to many relationship, or is it in the parent child relationship of the form and subform, or is it in the properties of the subform?

View 13 Replies View Related

Relationships, Referential Integrity And Subforms

Nov 24, 2007

If someone can help solve this for me, I would be forever grateful. I have attached the database to which I am referring for clarity.

I am creating a database designed to input data for morbidity and mortality at my hospital. I have set up four main tables: tbldemographics (basic patient information), tbladmissions (information about each different admission a patient may have), tblmorbidity (information about each untoward event suffered by a patient, which I would like to have linked to the specific admission, not just the specific patient), and tblmortality (information about a patient's death, which I would also like to have linked to the specific entry in the admissions table rather than linked to the more general information in the demographics table).

I have created relationships which I thought would work--but with referentail integrity invoked (which it seems like it should be), the very first key stroke on the form that I created to input the data (frmmain) results in an error message that the record can not be added or chaged because related record is required in tbldemographics--and yet this is the table to which I am inputting the data! Turning off referential integrity stops the error, but I don't want to just blindly do that--seems risky.

Problem number two: when I disable referential integrity and enter data into the demographics section of the form, any entry at all results in an automatic entry into the admissions table--even if I haven't entered that part of the subform yet. So if I then exit the form and return later, ANOTHER entry into the admissions table is made--again, even if I have not ventured into that subform yet. So that table winds up with bunches of entries with little to no data, which are NOT cleared up with a compact and compare maneuver.

I'm at a loss on both of these issues. I apologize for the long post, but appreciate any ideas you all might have.

View 2 Replies View Related

Tab Controls And Linked Subforms With One To Many Relationships

May 8, 2006

Hi there

I've got 3 tables related to one another with one to many relationships. They are:
21_Category
22_SubCategory
23_Indicator

where the 23_Indicator table has 22_SubCategory as its parent and 21_Category as its grandparent.

The forms wizard in Access has nicely developed a form with 2 subforms contained on it which does the trick for maintaining all 3 of these tables. The form itself displays 21_Category, subform1 displays 22_SubCategory and subform2 displays 23_Indicator. When I change the active record for either Category or Subcategory the subforms change their display as expected. All good.

My concern is that the form looks a mess and not very welcoming, too much info on one form, so I'd like to replace the 2 subforms (or even form plus 2 subforms) with one Tab Control. So far I can get the linking working correctly to the first page within the Tab Control but cannot link the second page child records to the active record in the first.

I'm using the Link Child Fields and Link Master Fields to do this. Even straight copying of the entries from my subforms which already work cannot get the Tab Control to behave in the same way.

Without wasting any more time on this, does anyone know whether it is easily possible or I'm missing something obvious? I suspect I've got something slightly wrong with either the Source, Link Child Fields, or Link Master Fields syntax, or referring to the wrong objects. Alternatively, Tab Controls just aren't designed to show one to many type records??

I'm not a VB Developer so if this isn't possible without writing a whole heap of code then I'll just have to cut my losses and use the crowded form I already have, though I'm happy to insert a few lines to get the Tab Control to work.

Thanks for your help in this. Apologies if this has already been posted loads before. I'm doing this as voluntary work for a charity and I'm a fairly new user of Access and VB (though I'm familiar with databases and SQL).

View 1 Replies View Related

Relationships Not Working..take A Look Plz

Jul 19, 2006

Hey everybody, I was almost done with this whole thing. It is a pretty basic database but I don't know what happened. If you look at the relationships the Employee Information table and the Metric information table are linked by employee id. For some reason when I enter information into the metric information table (via forms) it does not show up in the employee information table as a subform. Can anybody help please?

View 6 Replies View Related

Help Please! Form And Relationships Not Working

May 8, 2005

Hi- I am trying to create a Registration form for Events and I'm having endless trouble getting it to work.
Basically, I have four tables: Contacts, Registration, Payments, and Events.

I either cannot delete registrations when I need to-I delete a record in the form, but when I reopen it it is there again; or the pmts table is adding blank records.
So when I try to create a query to get a list of registrants, I will get two fields with the same name and Reg Id, and one with a pmt and one without.
I want one record per person registering and Im not getting that in my database.

Most, but not all, people are paying for events. Some people are staff or scholarships.
I want to be able to see just one record for every person who has registered, whether they have paid or not.
Im either seeing two records with the same reg number, or missing people that have not paid.

I have tried all kinds of configurations as far as relationships and Reg form and Im pretty stumped at this point. Any help would be greatly appreciated!

View 1 Replies View Related

Accessing Subforms Through Mainform Isnt Working???

Apr 2, 2008

Hi there guys,

Im in a bit of a predicament, I have a main form with 3 subforms named:


Debit/Cred income for day subform
Cheque income for day subform
PDC income for day subform


and in each of these subforms, I have a field/text box (From a query) which is called "SumOfTotal Cost"

and also in the mainform I have another field/text box called "text73"

Now, all I wanted to simply do was to add all of those fields mentioned together to display them on the main form in another text box as a total so I tried to use this expression in the control source:

=Me!Text73+Me![Debit/Cred income for day subform].Form![SumOfTotal Cost]+Me![Cheque income for day subform].Form![SumOfTotal Cost]+Me![PDC income for day subform].Form![SumOfTotal Cost]

But when i open the form, the text box just appears saying

"#Name?"

I then tried to put brackets at the ends of the code, but still nothing would work, I then tried to access each individual "SumOfTotal Cost" by putting the following in a text box:

=Forms![Cheque Income For Day subform]![SumOfTotal Cost]

but it still comes up with "#Name?".

I am pretty annoyed and I would really appreciate it if someone could please help me

Thanks a lot

View 14 Replies View Related

Zooming Commands When Working With Relationships

Jan 26, 2012

Zooming commands when working with relationships

1.Im wondering why there is no option to zoom in and out as we are working with relationships.
2.And even the option show all is not working; some of the tables in the relationship are kept hidden (screenshot is attached)! How could we work in this environment?
3.I do know the I can use the scroll bars, but they are not enough to perform the work more professionally

These features are available in most of the software!to zoom in/out To pan .To zoom all (extent Where are they in the relationship in Access?

View 2 Replies View Related

Subforms Stop Working After Adding Table To Query

Aug 16, 2013

I have a form with sub-forms. All the subforms work smoothly, I am able to assign students to classes, enter their late/absence data etc... But there's 1 subform that I want to include the Gender (male,female) so I have to go back to the query (see attached picture) to include the table with gender data and map it with other tables, then insert a combo box in that subform, which display the gender of the student along side with other data.

But the problem is as soon as I modify the query for that subform, all the subforms (including that one) stop working, I'm not able to enter and change anything with error like Recordset is Noteditable ( see attached screenshot).

And after I remove that table from the query and the combo box from the subform every works just fine again.

View 3 Replies View Related

Forms :: How To Find What Data Is Actually Being Passed Between Forms And Subforms

Nov 22, 2013

I have several Suppliers, each of whom holds several SalesEvents. At each SalesEvent I might buy none, one or more Bundles. Each Bundle then contains one or more Items. These relationships are all reflected in my Access 2013 desktop db as one-many relationships with cascaded updates.

My form structure for data entry reflects the Relationships, in that I have a Supplier form with a SalesEvents subform. On that subform I can enter data about each of that Supplier's SalesEvents, and each SalesEvent row has a button to call up a SalesEvent form which has a Bundles subform. Then each row of that subform has a button which calls up a Bundle form containing an Items subform. That Bundle form identifies the Supplier, Sales Event and Bundle number, and within its Items subform I can then enter the data for each Item.

Problem : All used to work fine, but I've clearly changed something because now when I select the Items button on the Items subform in the Bundle form, the system gives me the data for the first record in the SalesEvents table, rather than the one selected. I have checked the raw data and that's as it should be. I have tried to undo all the steps I took since it last worked properly, but to no avail. Restoring the last backup (taken when I'm sure it worked properly) still has the problem.how do I find what data is actually being passed between forms and subforms ?

View 3 Replies View Related

How To Link Subforms To Other Subforms On An Unbound Form

Feb 4, 2006

I forum could someone tell me:

I have an unbound form on that form I want to put three sub forms one on a products table the other on a course start dates table and the link table that joins the other two together. all three are related to each other with Pk/FK links.

When I try to link them it says you cannot link items on an unbound form.

regards in advance
Peter:eek:

View 1 Replies View Related

Forms :: Forms With SubForms Opening With New Record?

Mar 8, 2013

I have a main form with multiple subforms in tab view, right now the forms only open in edit mode, I would like all forms to open to new record mode. I know I can set the main form with the switchboard manager but what about the subforms?

View 2 Replies View Related

Forms And Subforms

Jul 2, 2007

I am attempting to create a database for my users to input new data via a main form. I have this main form where I use subforms as look up tables/queries to pull my stored data from. My problem is that I want to try and not have the subform on the main form; I want it to be its own window. Bear in mind I am new to using Microsoft access, and trying to learn as I go.

I have created all the forms with queries. I use the open form command to get me to my subform, which is a common findings form. From there I am able to search and filter, and once I find my desired record I want to be able to link certain fields back to the main form. (basically if possible use a command button to select this information and insert it on the main form). Typically, my users will have a generic finding to to record so I have inputted these findings so that they can select them and not have to type them themselves. Is this even possible for me to do this way, with a command button by writing a VBA code and linking criteria? The reason I am creating a separate form is so that the main form is not cluttered and is user friendly.

The fields I want to link are the same, however they are not from the same queries, and essentially the main form has its own since as of right now there is not data because it’s run of user input. The findings form has data. There are relationships established.

Thanks for any help, I feel like this might be confusing since I am unsure of exactly what I am trying to do, but any help would be greatly appreciated.

View 3 Replies View Related

Continuous Forms With Subforms?

Feb 8, 2005

Okay. I am trying to build a form where I could get information like this but also editable. It can be either bound or unbound with enough information to update the records. I could do this several other ways but would prefer it just like it is below. Any ideas is greatly appreciated. Sam.

REPORT_NAME_1
Active(y/n)
ELEMENT_1 Included(y/n)
ELEMENT_2 Included(y/n)
ELEMENT_3 Included(y/n)

REPORT_NAME_2
Active(y/n)
ELEMENT_1 Included(y/n)
ELEMENT_2 Included(y/n)
ELEMENT_3 Included(y/n)

REPORT_NAME_3
Active(y/n)
ELEMENT_1 Included(y/n)
ELEMENT_2 Included(y/n)
ELEMENT_3 Included(y/n)

View 1 Replies View Related

Complex Forms As Subforms

Mar 3, 2005

I have a complex form (in that it contains a lot of VB code and events) to display the information of various articles in my database. I would like to add some browsing options to the form (like a list of all articles on the left, and some different back/forward options), but I also need to preserve the form in its current state.
Rather than make a new copy of the form (and have to maintain TWO near-identical copies of the same form), I attempted to make a new form, with just the browsing list, and insert the old article information form as a subform on the left. However, it seems that any of the code from the original form which refers to Forms!Article Information!Article_ID ("Article Information" is the name of the original form) are not able to load the correct information, as I am prompted to supply it myself. Needless to say, I don't want the user to be prompted for the article number each time they open the form :).

I'm wondering how I would go about opening the old form as a subform in such a way that I am not prompted each time. Or alternativley, if there's a better way to do what I'm trying to do, how should I do it?

View 7 Replies View Related

Tabbing In Forms/subforms

Feb 21, 2006

I have search the forum and have found many solutions to this same problem but so far none have worked for me. I am fairly new to Access so maybe I am just not understanding properly.

I have a form with a main form and many subforms. All subforms but one are continuous and the other is a single form that does not allow additions.

1. I can tab from the main form to the first subform but can’t get the next subform.
I have tried this on the exit of the first combo box in the subform

Private Sub EventInitialActionTaken_Exit(Cancel As Integer)
If IsNull(Me.EventInitialActionTaken) Then
Me.Parent.[frmeventFsubform].SetFocus
End If
End Sub

This works until I open a new record from one of the subforms and then I get an error.

2.Then, my last subform is the single form with no additions and I want it to tab to a command button on the main form. Right now it just goes in circles throughout the sub form

3.Also, if I ask to start a new record while my cursor is in one of the subforms, the new record will open with my cursor in that subform field. How do I get it to default to the first field in the main form? I tried Me.EventID.Setfocus on the On Load Event of the main form but this didn’t work.

I think that if I get the answer to question 3 then the code I previously used in question 1 might work.

Any help would be greatly appreciated.
Thank you in advance.

View 14 Replies View Related

Dependent Forms? Subforms?

Oct 4, 2006

I have 3 tables:
tblFunctionalArea
FAID, FAName, Active(y/n)
tblSubFunctionalArea
SubFAID, SubFAname, Active(y/n)
tblLinkFAwithSubFA
FAID, SubFAID

What I need is all possible Functional Areas listed on a form where you can click on active checkbox to activate that Functional Area.
Then on the next form I need Sub-functional Areas listed, but only those that tie back to Functional Areas that have been activated.
Is this at all possible to achieve? I really don’t know how to go about doing this. Do I need a form, or may be I need a subform? I'm at a loss.
Any help would be greatly appreciated.
Thank you.

View 9 Replies View Related

Controlling Forms And Subforms

Dec 10, 2006

Howdie y'all

I need a few pointers wrt the relationship between a form and its subform.

I have the following form:

http://i88.photobucket.com/albums/k193/bernmc/Misc/DefaultStaffingscreenshot.jpg

Top part of the form is for adding/editing etc.

The subform is based on a query. The two are linked on the 'week' value.

Now, this is what I want to do:

The user must not be able to edit data in the subform (so should I use a report instead... but then will I be able to do 2...).
Selecting a row in the subform should cause the whole form to go to that record so that the user can then modify info in the fields of the main form.

I don't know VB - the only code I've used is gleened from searching these forums (a great resource, so I'm learning slowly), so I'll need a bit more than 'Do a wrzmitchigob on the bleedlethrop'!

View 10 Replies View Related

Search Forms/subforms

Sep 21, 2007

Please Help
I have a form that has pages of subforms in it.
i have a number of fields in various subforms.
i need the user to be able to filter the form by any or all of the fields?
how should i go about doing this?? I"m a newb at this so please talk slow

View 1 Replies View Related

Forms :: Getting A Form With 2 Subforms?

Apr 11, 2013

I need a form with 2 subforms. the main form is for an indidual. the first subform is a list of characteristics. the second subform is sort of a calendar function, produced for date scheduled, results, next meeting date.

I have tried the form wizard, but it produces a jumble of the mixed fields. Can I create a subform or 2 before I create the main form, and then link them somehow?

View 6 Replies View Related

Forms :: No Scrollbar On Subforms

Mar 27, 2013

I'm using access 2007 and I have a form with six subforms on it. When the form is completely load the subforms DO NOT have scrolls bars (for up and down) on the right side even though the data (rows) far exeeds the number of rows displayed. I have checked all the properties and all appear to be set up correctly. If I refresh a subform with VB on load of the main form the subforms scroll bar will show. The problem with doing this for all six subforms is the amount of time it is taking. Is there something I might have overlooked, is this a bug with Access?

View 5 Replies View Related

Forms :: Form With Two Subforms

Oct 24, 2014

I want to create a form with two subforms. I create a form with one subform without problems but i would like to know how i can link the two subforms, so when i select a row in first subform display records in second subform.

View 1 Replies View Related

Forms :: Possible To Have 3 Subforms In A Form?

Oct 3, 2013

is it possible to have 3 subforms in a form?if so how would i go about this i have created the form and the 3 subforms however it only allows me to link one into the form.

View 7 Replies View Related

Forms And Subforms On Access Pages

Jun 25, 2007

:confused: Hi everybody. I have started trying to be a little more creative and making my systems a little more what the big boss where I work would like to see. I have set up an Access Data Page, with one form on it where the user would enter some required information, which is saved into a table for me to monitor (date, time, unit, spec reviewed, name etc). What I was hoping to do, was have on teh same Page, a subform or another form, where the user would reference that other form, when doing their entry. Basically, they are entering that they looked at a certain spec so if they produce the wrong item, or use the wrong materials, we can say well, you looked at this spec, or so you say.....Does anybody have any suggestions on how this can work? Or even if it is at all a possibility. Thanks!

View 3 Replies View Related

Calculations With Values In Forms & Subforms

Jan 21, 2005

Hi Everyone! Bear with me, I'm new to Access and I may not understand or use all the terminology correctly.

Background: I'm creating a database to track the inspections of many businesses. Each business will have many inspections throughout the year and each inspection has many items. I have a form set up which includes Business info and Inspection info (#items inspected, subtotal for inspection) on the main form, and Items in error listed on a subform (no error=no items listed).

Problem 1: I need to make a count of all items that are listed. I can do this in the subform, with no problem (in one of the footers #Discrep:count([item])) but now I need to report and use that value on the main form to calculate the percent error for the entire inspection. I don't know how to pull in onto the main form to set up my calculation. :confused:

Problem 2: This one is related and is probably the same fix. I have PriceCharged and PostedPrice for each item. I need to calculate the net error and then, using the subtotal on the main form, calculate the % dollar error.

Any suggestions, oh great and powerful gurus of the Access world? I hope I explained that clearly enough for you.
Thank you very much in advance!
~Lith

View 3 Replies View Related

Copying Forms/subforms/frames?

Oct 24, 2005

I am in the process of trying to build a template in forms for my boss to quickly enter information and construct a PowerPoint presentation from this information.

Basically, I have a form that he can enter information, but it needs to look professional (not datasheet view). Is there a way that I can make a subform and frame it, so that I can copy the entire form (not just the data) and paste it onto powerpoint? I need the formatting to be consistent and appealing!

View 2 Replies View Related







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