Linking A Subform To Another Subform

Apr 18, 2006

Hi All.

I have a from "frmMainClient" which has a subform "frmJob". They are linked using a field "accoint_no". when run the output show me the content of the "frmMainClient" and all the related jobs in the "frmJob" subform.

That fine. I now want to add another subform "frmSuppliers". I want to link the "frmSuppliers" to the "frmJob" using a field "supplierID" which is in both forms.

The end result required is the "frmMainClient" content is display along with all the records in the "frmJob" (linked) and all the records in the "frmSuppliers".

I hope I have been clear.

Can anyone point me inthe right direction to make this work.

Many thanks, keep safe and well.

Dereck

View Replies


ADVERTISEMENT

Linking From A Subform

Mar 8, 2005

Hope someone can help me with this:

1. I have a form called F_Progress.
2. I have a form called F_Property.
3. F_Property contains a subform called F_Job.
4. F_Property is linked to F_Job by the Job ID field. Its a one to many relationship.
5. F_Job is linked to F_Progress by the Job ID field as well. One job has many months progress.

What I want to achieve:

I want a button within the subform (F_Job) which when you click on opens the related record in F_Progress where the Job ID is the same as the one in the subform.

Any suggestions very much greatly appreciated.

MZP

View 1 Replies View Related

Linking Form And Subform

Jan 5, 2006

Firstly, apologies if any of the following seems to denote bad database design or a lack of forward planning. It does, but I've inherited it, so I'm stuck with it (for the time being).

I have a Subform (Training_Records_Sub) linked to a Form (Employee_Training). Both forms get their data from tables of the same name.
Up to now, these have been linked on the field Employee_ID. This has been working fine, as all information stored related to permanent employees, so everyone had an Employee_ID value.

Now, however, I've been informed that the system also needs to store information on temporary and contract staff, neither of whom have an Employee_ID number. In fact - for reasons I fail to understand but which I'm sure make sense to management - there is no unique indentifier stored for any of these people.

The best I can come up with is as follows:

Permanent Personnel - Can be uniquely identifed by Employee_ID and Cost_Center.

Temporary Personnel - Can be uniquely dentified by Last_Name, First_Name and Requisition_Number (this last number can apply to many people). I realise that two people of the same name COULD be hired under the same requisition number, but I've been assured that this won't be allowed.

My problem is in working out how to now link the Form and Subform.

Is there some way to use an 'If...Then..Else' statement? Even in VBA? I've sort of got an idea of what I need, but a day of playing with the code hasn't worked, so I thought I'd try posting.

Any ideas greatly appreciated.

View 1 Replies View Related

Picture Linking Subform

Nov 17, 2006

I'm having a problem with my sub forms and the sample linking image code.

Top subform is in data view and the bottom in form. Sync'd with a textbox.

notes show individual data per record as you click on them, and the picture updates the location the same.

Problem I am having is that the picture does not display even though the path is there.

View 10 Replies View Related

Subform Linking Error

Dec 20, 2005

Could someone please help me trouble shoot this error:

"The Link MasterFields property setting has produced this error:'A problem occurred while Microsoft Access was communicating with the OLE Server or Active X Control'

I get the error when I try and select an item from a drop down list in a combo box on a subform that is linked to another form. The list is coming from a separate table.

When running the subform without opening the parent form I can choose from the combo box and do not get the error.

C

View 3 Replies View Related

Linking Subform To Form

Jul 20, 2006

hey all,

i am having a problem linking my subform data to my form data on more that one fitler.

that is, i have a form that contains Last_Name and First_Name and a subform that pull a different set of info form anther table as i scroll through the main form.

on the properties of the subform i have Filter set to "Me.FilterOn="Last_Name".

BUT i need to bring in the filter on Last_Name AND First_Name because of different entries that have the same last name.

thanks
tuk

View 2 Replies View Related

Linking Two Combo-boxes Within A Subform

Mar 13, 2005

I'm creating a database to assist with the sales operations of a hat shop. I have a form for creating new orders called 'Invoice' where the order number and date is set.
Within this form is a subform called 'Invoice_Order' (Continuous layout), this form is used for assigning order items to an order number.
Within the subform there are two combo boxes which search the Stock table.

1st ComboBox- diplays hat styles (E.g- v1/v2/v3/v4...)

Problem is; different hat styles are available in different colours based on the material used. I would like the second CoboBox to display a list of colours depending on the style of hat chosen.
At present i can only get it to display a list of colours for all hat styles.

Does that make sense?
Any help would be most appreciated

View 4 Replies View Related

SUbform And Linking Primary Fields

Oct 12, 2005

At the moment i have an exisiting database that was not created by me. It consits of about 7 tables and a main table. Each table has a Primary Key that is a joining field. The Main form is built with subforms and when i enter a number in the primary key filed of the main table it enters that number in all the other primary keys in the other subforms.
i have now tried to create another subform to put into the main form but i cannot get this "link" between the primary fields to work.
can someone please help.

View 1 Replies View Related

Forms :: Linking Combobox With The Subform

Jan 30, 2015

I have a form with a combo/dropdown on the MAIN form and a child subform.I have designated a Master /Child link of ID to FGId respectively linking the combobox with the subform.

However, when a select an item from the combobox I expect to see the subform datasheet refresh accordingly. This is not happenining , even when I force a refresh call on the subform control itself....?

View 1 Replies View Related

Ambiguous Name Detected-error On Linking Subform

Aug 23, 2006

Hello,

I have a form and subform linked by the ID field (AutoNumber) on the Form and Record ID field (Number) on the subform. I have the field size on the Record ID field set to Long Integer.

When the form is opened, a message pops up "The LinkMasterFields property setting has produced this error: 'Ambiguous name detected: Add_client_info_Click' There was a macro set up with the name Add client info. However, that macro is not being used on either of these forms. I don't understand why this message is popping up.

Any ideas? I have checked each form, each form section and each field to make sure that macro didn't somehow get assigned, and I can't find it anywhere in relation to these 2 forms.

Thanks
Stacey

View 1 Replies View Related

Linking Subform Fields To Main Form

Nov 22, 2006

Hi,

I have a form linked to a subform by an activity field, Both have a UID field also. I want to store the UID from the main form in each record in the subform. How do I link the two? I've done it before but cannot remember how and have been trying now for AGES! Any help would be much appreciated :)

View 2 Replies View Related

Forms :: Linking Field From Main Form To Subform

Aug 16, 2013

I have an entry form with a field(combo box) called cboGetCode. I also have a sub form (continuous form) with number of fields, also an entry form. Now, I have added a code behind the cboGetCode AfterUpdate event to populate the result to relevant fields in the main form.

PHP Code:

Me.lngSCode = DLookup("[lngSchoolCode]", "[qrReadingFirstSchools]", "[lngSchoolCode]='" & Me.cboGetCode & "'") 

This is working very well.Now, what I would like to do is get code as shown in the cboGetCode field to my sub form lngSCode field.

View 1 Replies View Related

Frequent Error In Referring / Linking Textbox In Subform From Text Box Within Main Form

Apr 17, 2013

Go to frmInvoice, and you'll see a Net Total box (txtNetTotal) . It's control source is linked to a textbox in the subform fsubInvoiceDetails2 called txtStocktotal. It basically just pulls up all the costs associated with that InvoiceID.

The reference mechanism is as follows: =[fsubInvoiceDetails2].[Form]![txtStockTotal].Now...sometimes this works and sometimes it doesn't! Sometimes i've had to use: =forms!fsubInvoiceDetails2!txtStockTotal.

It seems to be very temperamental at times and i'm not fully confident if this can be explained.By way of note, I use express builder normally to input these statements: I go to Forms > ALL FORMS > fsubInvoiceDetails2 > txtstocktotal.

View 2 Replies View Related

Forms :: Linking Form To Subform Set To Continuous Form View

Aug 22, 2014

How to populate the parent form's PK to multiple records in a child subform set to a default view continuous form?

In other words, how to auto populate the primary key to multiple records displayed the subform?

View 5 Replies View Related

Forms :: Refresh Pivot Chart In Subform After Changing The SQL Of The Subform's Query?

Sep 16, 2014

I have a form, a couple of comboboxes and text boxes on it. When these are filled out, the SQL of a query is changed using these parameters.

There are three subforms on the form, all pivot charts, all based on the query being changed.

The goal would be to update all three according to the user-given parameters.

Right now the subforms only update if I close and open the form, which is probably not the best solution, since it's too slow.

I've also tried to requery and refresh them, with no result.

Then I tried to overwrite the recordsource of the subforms with the same text that was originally there. This got them to refresh their data, but then all of the charts disappeared and had to be built again, so this is a no go too.

View 7 Replies View Related

Forms :: Selecting Record In Parent Subform From Child Continuous Subform

Jan 26, 2014

I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)

The continuous form cannot be edited, it is to be a list for viewing the information only.

I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.

I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.

I tried the DoCmdSearch for record and just keep getting object is not open errors.

View 2 Replies View Related

Subform Blues - Data Entry Setting Itself To 'No' & Requerying 1 Subform From Another

Dec 5, 2006

2 Subform problems

I have a data entry subform that is only supposed to show an empty record ready to be populated, and a display records subform that is supposed to show all the records. The subforms are both on the same tab of a tab control on my main form.

Problem 1:
The data entry subform shows all the records rather than a blank record. Something on my main form is causing it to show the records when it should not. Any ideas? The Data Entry is set to Yes.

To try to isolate the problem, I created a new form and added the subform to it where it behaves properly:confused:

I then added Me.DataEntry = True to the form open to see if that would solve my problem but it still sets the data entry to no.

If I have the properties box open when in form view of my main form, I can set the data entry to Yes and it works fine until I move to the next record of the main form when it resets to no. Teraing my hair out here.:mad:

My final attempt was to search the entire project to see if there is a "DataEntry = False" somewhere but there isn't. What is setting this property? Any ideas where I should look?


Problem 2:

After entering data in the first subform (data entry form), I want to re-query the second subform but I just can't get the syntax right. I have wrestled with the "Syntax for subs" document downloaded from http://www.mvps.org/access/forms/frm0031.htm (Microsoft MVP site) but to no avail.

My main form is called fdlgPrjDetails, the data entry is via fsubPrjCommentsUsersDataEntry and the subform I wish to requery is fsubPrjCommentsUsers.

None of the attempts below worked giving a cannot find control error.


Private Sub Form_AfterUpdate()
On Error GoTo ErrHandler

Me.Requery

'Me!fsubPrjCommentsUsers.Requery
'Me!fsubPrjCommentsUsers.Form.RecordSource.Requery
'DoCmd.Requery ([fsubPrjCommentsUsers])
'DoCmd.Requery [fsubPrjCommentsUsers]

ExitHere:
Exit Sub

ErrHandler:
MsgBox Err.Number & " - " & Err.Description & Chr(13) _
& Chr(13) & "Error in fsubPrjCommentsUsersDataEntry: Err 003"
Resume ExitHere
End Sub


Any Ideas?

Both problems have me stumped so I'll be grateful to anybody with a scoobie on this.:)

View 10 Replies View Related

Forms :: Calculate Subtotal On Subform And Display On Upper Subform

Jun 20, 2013

im having problems getting a subform to calculate another subform's total and display it as it keeps coming up with the #NAME?.Basically my database is like this

tblCustomer
- tblOrders
- tblItems

and this is displayed on a form. so you can flick through clients, then flick through the orders and its broken down into the items inside each order.i have seen many answers that are only about calculating something on a subform and displaying on a form but this does not work when displaying on a 'parent' subform. the form structure looks like this

frmCustomers
- sFrmCustomerItems
- sFrmCustomerOrders

i have a calculated control textbox in the footer of sFrmCustomerOrders with sums up all the prices using =sum([Price])and in my sFrmCustomerItems, i have a field called Amount (the total amount of all the items) and the Control Source formula i was using was =[Forms]![sFrmCustomerOrders]![sFrmCustomerItems]![txtTotalPrice] but i get a #NAME? error.

View 5 Replies View Related

Unbound Subform Counts Toward Two Subform Depth Limit?

Jul 26, 2006

I didn't know that Access is supposed to only have 2 subform deep. On my form, I have three subform deep. However, the master form is unbound, not linked to subforms, and nothing more than a container for tab pages which contains their own subforms and has no code directly associated with data. There is a code to move subform to new record when tabs changes, but that's all.

Does that mean there is really only two subforms deep from the topmost form on the tab page or the subform depth has been exceeded whether the master form has no role in data transaction?

View 1 Replies View Related

Filtering Field In 2nd Subform Based On Selection In 1st Subform

Sep 1, 2006

I almost have this form done.

I have a form with a combo box, and 2 subforms from it. When you select in the combo box (Group), it brings up the choices (Sections) for that group in a subform. Then there is another subform, that is supposed to bring up a series of questions that are related to the section that has been selected. The question field has a drop down to a list table, that has all the questions. Once the question has been selected, it stores in a Master table. The relationship is there. If you try to select any questions that do not pertain to the section, it gives you an error message.

What I need it to do, is when the section is selected, filter out the questions that pertain to that section, and have those questions be the only ones available in the drop-down list to choose.

I know that I need to have an After Update code once the section has been selected, but not sure how the coding should be.

I hope that someone can help with this!

:confused:

View 1 Replies View Related

Filtering Field In 2nd Subform Based On Selection In 1st Subform

Sep 1, 2006

I have a form that is almost complete

I have a form with a combo box, and 2 subforms from it. When you select in the combo box (Group), it brings up the choices (Sections) for that group in a subform. Then there is another subform, that is supposed to bring up a series of questions that are related to the section that has been selected. The question field has a drop down to a list table, that has all the questions. Once the question has been selected, it stores in a Master table. The relationship is there. If you try to select any questions that do not pertain to the section, it gives you an error message.

What I need it to do, is when the section is selected, filter out the questions that pertain to that section, and have those questions be the only ones available in the drop-down list to choose.

I know that I need to have an After Update code once the section has been selected, but not sure how the coding should be.

I hope that someone can help with this!

View 1 Replies View Related

Forms :: User Select Subform Filters Other Subform

Oct 8, 2013

i have a form with 2 subforms. when the user selects a record in subform one. the date of that record filters subform 2. in the source query of subform 2 i have this under criteria

Code:
[Forms]![frmeventbuild]![frmBUILD]![EVENT_DATE]

View 3 Replies View Related

Forms :: Automatically Updating Fields In A Subform From Another Subform

Feb 11, 2014

I am having trouble figuring out the method to automatically update some fields in SubForm from 2 other SubForms.I have attached 2 pics, the first GradeEntry1 shows what the tblTopic_Class_Grade form looks like after I manually enter everything into it. GradeEntry2 is what the form looks like when I fill out the Form starting at the top.

I'd like the tblTopics_Class_Grade form auto-populate the TrainingClassID (it currently does this), TopicClassID, StudentID, TrainingTopicID based off the entry from the above forms.My end goal is that I need to have a grade for each student on each training topic for each class. Like:

Class1-Student1-Topic1-GradeX
Class1-Student1-Topic2-GradeX
Class1-Student2-Topic1-GradeX
Class1-Student2-Topic1-GradeX

View 6 Replies View Related

Forms :: Requery 2nd Subform When Different Record Highlighted On First Subform

Sep 3, 2013

I have two sub forms on a main form.Subform 1 displays information which comes from a query, filtered using two combo boxes on the same form.The active record on the data sheet has two field values output to hidden text boxes on the form.

These text boxes then provide the values used for the query displayed on the 2nd sub form.When I highlight a new record in subform 1, the text box values change, but the values in sub form 2 do no.Which would be the best method to use to get this to requery?

View 10 Replies View Related

Forms :: Get Subform To Requery After Choosing A Name From Combo Box On Subform Itself

Jul 26, 2013

All I am trying to do is get a subform to requery after choosing a name from a combobox on the subform itself, thus updating the records on the subform. The main form name is "BasicTestOneF" the subform name is "ICminiBasicF" and the combobox name is "Combo4"

I have the combobox requery on After Update, but I still get the "Enter Parameter Value" popup. I've spent the last hour and a half just trying to get this simple thing to work and have gone through I don't know how many sites and forum posts, tried every combination of VBA code I've found, and I still can't get it to work.

View 14 Replies View Related

Sum Specific Values On Subform And Place Result On Another Subform

Jan 10, 2015

The forms in the code are subforms on a TabControl on a main form.

I have this code which needs to add together only the areas [Area] of records with a FloorNumber field value of 1 or 2 or 3 or 4.

At the moment the code works for one entry of 1 in the form frmRoomDetails. I'm guessing i need For Next or something like that but i don't know and also unsure of how to code it.

Private Sub FloorNumber_AfterUpdate()
If [Forms]![frmSiteDetails]![frmRoomDetails].[Form]![FloorNumber] = 1 Then
[Forms]![frmSiteDetails]![frmFloorsDetails].[Form]![Text8].Value = [Forms]![frmSiteDetails]![frmRoomDetails].[Form]![Area]
End If
End Sub

View 1 Replies View Related







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