f



Sub-forms of Sub-forms

I'm creating a data-entry form for 3 tables.  There is a one-to-many
relationship between table1 and table2 and a 2nd one-to-many between
table2 and table3.  What I would like to do is have the user select
from a combo box on the main form a record from Table1.  That would
filter the subform on the main form to just the records from Table2
with the PK from Table1.  I've got everything working fine up to this
point, but am a bit confused on where to go next.

I need a mechanism for the user to pick one of the records from Table2,
and be presented with an entry for for all records in Table3 that have
the selected PK from Table2.  I've tried putting a 2nd subform on my
main form, but am having trouble getting them to link together.
Something else I tried, is putting a command button on each row of
Table2's subform in continuous forms view to open up a seperate form
for Table3.

0
John.Forr (2)
7/20/2006 9:15:52 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

3 Replies
474 Views

Similar Articles

[PageSpeed] 53

Try setting the Default view of the 2nd and 3rd subform to datasheet
view. 
SY

0
syates (23)
7/21/2006 12:17:21 AM
Greetings,

Here is something I came up with that should do what you are asking:

Do the Link Master/Child thing with the mainform and subform1.  Subform1
will need to be in Datasheet view for this trick to work.  

The 2nd subform - which will also be placed on the mainform (and also
needs to be in datasheet view) will have its recordsource be based on a
query of the table for that subform (a query for table3).  You will use
a parameter in the criteria field of the query for the link field
between table2 and table3.  This parameter will be a function that you
will create in the Access Module tab.  It is a very simple function.  

Create and save a standard module (not a class module).  Then create a
Public variable of the type whatever the link field type is between
table2 and table3.  If the link field is a number then

Public fieldnameVar As Integer

If it is a text field then

Public fieldnameVar As String

Then function is just this:

Function Param() As Integer (or String)
  Param = fieldnameVar
End Function

Save the module

Then in the query for table3 in the criteria for the linkfield  just add
the function name 

Param()

You need to include the Parentheses here.

In the first subform, go to its design view then go the code module for
that form.  Every form code module has 2 dropdown boxes at the top of
the module.  In the left dropdown for your subform - select "Form".  In
the right dropdown select "Current".  This is the Current Event of your
subform.  Here is where you set the value of the globar var fieldNameVar

Private Sub Form_Current()
   fieldnameVar = Me.yourLinkfield
End Sub

When you select a row in subform1, that triggers the Subform's current
Event.  You can then set the value of fieldnameVar to the textfield in
the form.  If you open the query that contains the Param() as criteria,
you will see that the query gets filtered by the value from the row you
selected in subform1.

Lastly, in the main form you will have a command button.  In the command
button you will requery your 2nd subform and the correspponding rows
will show up.

Private Sub Command14_Click()   
   Me.Form3.Form.Requery
End Sub

So it is Me. the name of your 2nd subform and follow that by
..Form.Requery

You will now see that rows in the 2nd subform that are related to the
row you selected in the first subform.


Rich

*** Sent via Developersdex http://www.developersdex.com ***
0
rpng123 (1033)
7/21/2006 6:36:30 PM
Thanks for the answer Rich P.  It looks like that'll work so I'll give
it a try.



Rich P wrote:
> Greetings,
>
> Here is something I came up with that should do what you are asking:
>
> Do the Link Master/Child thing with the mainform and subform1.  Subform1
> will need to be in Datasheet view for this trick to work.
>
> The 2nd subform - which will also be placed on the mainform (and also
> needs to be in datasheet view) will have its recordsource be based on a
> query of the table for that subform (a query for table3).  You will use
> a parameter in the criteria field of the query for the link field
> between table2 and table3.  This parameter will be a function that you
> will create in the Access Module tab.  It is a very simple function.
>
> Create and save a standard module (not a class module).  Then create a
> Public variable of the type whatever the link field type is between
> table2 and table3.  If the link field is a number then
>
> Public fieldnameVar As Integer
>
> If it is a text field then
>
> Public fieldnameVar As String
>
> Then function is just this:
>
> Function Param() As Integer (or String)
>   Param = fieldnameVar
> End Function
>
> Save the module
>
> Then in the query for table3 in the criteria for the linkfield  just add
> the function name
>
> Param()
>
> You need to include the Parentheses here.
>
> In the first subform, go to its design view then go the code module for
> that form.  Every form code module has 2 dropdown boxes at the top of
> the module.  In the left dropdown for your subform - select "Form".  In
> the right dropdown select "Current".  This is the Current Event of your
> subform.  Here is where you set the value of the globar var fieldNameVar
>
> Private Sub Form_Current()
>    fieldnameVar = Me.yourLinkfield
> End Sub
>
> When you select a row in subform1, that triggers the Subform's current
> Event.  You can then set the value of fieldnameVar to the textfield in
> the form.  If you open the query that contains the Param() as criteria,
> you will see that the query gets filtered by the value from the row you
> selected in subform1.
>
> Lastly, in the main form you will have a command button.  In the command
> button you will requery your 2nd subform and the correspponding rows
> will show up.
>
> Private Sub Command14_Click()
>    Me.Form3.Form.Requery
> End Sub
>
> So it is Me. the name of your 2nd subform and follow that by
> .Form.Requery
>
> You will now see that rows in the 2nd subform that are related to the
> row you selected in the first subform.
>
>
> Rich
> 
> *** Sent via Developersdex http://www.developersdex.com ***

0
John.Forr (2)
7/24/2006 2:58:11 PM
Reply:

Similar Artilces:

Form
I have a table TBL_NAMES : IDNAME , Name_person , ETC..... (15 different labels) I have a second table TBL_POINTS : IDPOINTS , LINKNAME_PERSON , POINTS_ALGEBRA , POINTS_GYM , etc.... (25 courses) I have made a form where all the names are listed and when i click on a name another form is opened with that persons name on top and a number of labels and textboxes where i put those points in. So far no problem. BUT... i want one record per person. So the next time i click on his name i would like to see those points and be able to change them but i must not be able to create a new record. T...

Query By Form Using Same Sub Form and Main Form
Having problems displaying query results from combo boxes on a sub form, which is on the same form that is used to select criteria. This has always worked form me when displaying query results on another main and sub form. The requery on the sub form and refresh comands on the main form do not work when the form is first displayed and when the selection criteria is changed. Should I be doing a refresh and then repaint of the sub form. > ' Creates saved query in the database container for the sub form Call BuildSql("") ' The following commented line correctly displays query results on a seperate sub form that has the results from the criteria selected on the form currently in use. 'Docmd.OpenForm "MainFormSeachResults ' The following two lines attempt to display the results on a sub form which is on the same form where the criteria is selected: Me.frmSubFormResults.Requery Me.Refresh < Hi Tom, I often use an unbound main form to collect criteria, then show the results in a datasheet-style subform. I create the SQL string using code, and then use that string as the Recordsource for the subform directly (no need to save it as as query in the the database container) As an added bonus, the subform refreshes automatically ... no need to "Refresh" or "Repaint" anything. Here's some sample code to illustrate: - lstFieldNames is a listbox containing field names ... which is one of the choices in the listbox&#...

Combobox in sub-sub-form
I have a combobox bound to a field in a sub-sub-form which remains blank as I traverse through the records in the parent form. It works fine when I have a simple rowsource query but remains blank when I add more critera for the search. I also have to requery it everytime I change the parent record. Is there an easy/better way to display field values in a combobox whilst specifying additional criteria in the row source? Rowsource = SELECT cont_nbr, cont_firstname, cont_lastname FROM cont_mstr LEFT JOIN ad_mstr ON cont_ad=ad_nbr WHERE (((cont_ad)=forms!frmApptReport!appt_ad)) Or (((ad_name)...

Continuous Forms with sub-form
I have a need to create a form containing schedule detail with a sub-form containing a crosstab of date detail. I would like to display it as a continuous form so the user can see related schedules together with the dates. Is there a way to get Access to do this? It won't allow continuous forms with sub-forms. Filling unbound controls on the main form only show the current record's date information. I would prefer not to use a big un-normalized temp table. On Wednesday, December 18, 2013 7:10:34 AM UTC-6, Ron Paii wrote: > I have a need to create a form containing schedule detail with a sub-form > > containing a crosstab of date detail. I would like to display it as a > > continuous form so the user can see related schedules together with the > > dates. Is there a way to get Access to do this? It won't allow continuous > > forms with sub-forms. Filling unbound controls on the main form only show > > the current record's date information. I would prefer not to use a big > > un-normalized temp table. Use a datasheet? Ron Paii wrote: > I have a need to create a form containing schedule detail with a > sub-form containing a crosstab of date detail. I would like to > display it as a continuous form so the user can see related schedules > together with the dates. Is there a way to get Access to do this? It > won't allow continuous forms with sub-forms. Fil...

Access Sub Forms
Hello All I am trying to build a couple of forms in Access 2000. Whilst I have one form which has all of the contact details in it also generates (using autonumber) a unique id for the customer. I have also created a button to open up another form which looks at a second table. I want the ID automatically populated into the form (tables are designed one to many) so that correspondence can be added. At the moment access states that data needs to be inserted into the clients table before data can be inserted into the correspondeance table. A subform has been successfully created using the but...

I need to create a sub sub form
Hey there, My form displays info into a subform based on information chosen from 2 combo boxes. Can I somehow inside the subform, have 2 more combo boxes, thus drilling down even more to display a 2nd subform with data filtered from the recordset of the subform? Whats the easiest way to do this? Any help is appreciated, thanks! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200805/1 ...

calling a form sub from another form
Hi All This might sound simple, but I'm stumped. In essence I have a 2 form app that connects to an SQL db and extracts info from it. This works fine. The problem is with my 2nd form. The 'run through' is that the user can select an inv no from a combo box on form1 and when they select one, I auto-extract info from a db relating to this inv no, concat the various data fields with 2 other text fields (contains footer info) that are on form 2 and present it in a large text box on form 1. This also works fine. The problem is that the user may be previewing the large text box da...

Populate key from form to sub-form
I'm trying to figure out how to bring the key field from a parent form to populate the corresponding field in the sub-form during data entry, or to filter sub-form records during data viewing and updating. Can anyone help me? Bob Bob Mikels wrote: > I'm trying to figure out how to bring the key field from a parent form to > populate the corresponding field in the sub-form during data entry, or to > filter sub-form records during data viewing and updating. > > Can anyone help me? Use the subform's Link Master Fields & Link Child Fields properties. See...

Problem with ControlTip Text on form/sub-form
Hi All, If utilized as a sub-form, the ControlTip Texts of all the labels (you know...you can hover the mouse over either the control itself, or the label for that control) flickers like crazy. Hover the mouse over the control itself and it's fine. However, if I put the mouse over the short distance between 2 controls, it also will flicker. Get the mouse solidly over one or the other control and it's fine. Also, this sub-form, if used as just a form by itself, is fine. No flickering either on the label, or "between" 2 controls. Anyone know why this would be happening and how to stop it? It's gonna drive my users nuts. TIA ron ...

Display recordcount of a sub form in a main form
Hi All, I am using A2 for this database. I have a main form with bound fields of FlightNumber and FlightDate I also have a subform. This subform takes details of a passanger along with other details. I also have a textbox called status in subform. When a passanger's details are entered, status value is set to "confirmed", when passanger calls in to reconfirm flight, status value changes to "Reconfirmed", and when passanger calls in to cancell his/hres flight, status value is set to "cancelled". Sometimes, status textbox may also have a value of "Wait...

Unbound ADO Continuous Sub-Form Form?
Hello All, Is is possible to use an ADO recordset to populate an unbound continuous Subform? I've done some Googling without much luck, so this maybe impossible, but let me try to explain why. I've been exploring using Access as a front end to both SQL MSDE and Oracle XE. I'm in the process of writing a class to handle the basics of the ADO connection and recordsets. The basic relationships are as follows: 1 Main form with Company data (one side of relationship) 2 Subform with Exec data (many side of relationship) 3 Subform with Recordset Selectors buttons (Next, Previous, Last, & First), current record # and total recordset count 4 Subform with Command buttons (i.e. Save, Cancel, Edit, New Record, & Delete) I've written successfully the complete form and subform (i.e. 1 & 2 above) WITHOUT the class and subforms for the recordset selectors and command buttons (i.e. 3 & 4) above. This works if I dump the Exec data into a temp Access table in the MDE file. LOTS OF CODE. I can reduce the code by using the class. I've started writing the class and have the Recordset Selectors buttons functionality working (i.e. 3 above) when I came across the ideal of form multiple instances per Allen Brown's web site at http://allenbrowne.com/ser-35.html. The PROBLEM: The Exec data in the subform which is the many side of the relationship is currently using the temp Access table in the MDE file which prevents multiple i...

got myself in a corner with sub sub form and links
TRYING TO USE SHORT NAMES might make more since. I have a main form and its tied to tblmain subform1 and it is tied to tbl1 subsubformA on subform1 tied to tbl2 MAIN---tblmain----autoid subform1----tbl1----ID subsubform1----tbl2----ID hope that makes since. mainform to subform is AutoId to ID the links on the subform to subsubform is ID to ID ID (tbl1) ID(tbl2) all of this works but it requires them to put in some data on the subform so It gets an ID and then the subsubform will link to it. This is great until they want to put some data into subsubform and nothing in its parent form. No record nothing to link to. I thought about trying to tie subsubformA tbl2 to tblmain but the links on the forms/subforms won't allow that. how should I do this so they can enter data into the subsubform without entering data into the subform? make an autoid and/or Id field on the subform and make Id required? Then if they didn't do anything on this form would I end up with empty records in the table? anyone know how to get around this so I don't have empty records but allow them to put in whatever they want? If it makes sense to have data in the main Form, no data in the Form embedded in the first-level Subform Control, but data in the Form embedded in the second-level Subform Control, then you have structured your Form/SubformControl/SubformControl wrongly. The first level of Subform Control should contain information related many-to-one to records ...

Problem with Totals on Sub Forms and Main Forms
I have an access data project (MS-SQL Svr 2000 backend and MS-Access 2003 Front End) that has a sub-form based on a query view. On the sub form I have several column's in which I have a running total on the sub-form footer. This part works fine. My problem is that the main form, on which the sub-form resides, I want to display the total from the sub-form total calculation. I have tried referencing the control on the sub form, i.e. My.Somecontrol = Forms![formname].[controlname] but this does not work. How do you make this works. Do I have to do something different because this is ...

Access 2007 sub forms
Hi all I have converted an accress XP data file to access 2007. The problem I now have is I cant add any data to the subforms. I have enabled all the allow options but still no go! Please help this is quite urgent. My Email address is shaunfish@gmail.com Ta Shaun Fisher Subforms do work in A2007, Shaun, so you have another problem to track down. The people who volunteer their time here can make suggestions, but you cannot email your database to them and expecet them to fix it for free. If the subform is based on a query, you might open the query directly and see if the new row exists there. If not, here's some reasons you might check: Why is my query read-only? at: http://allenbrowne.com/ser-61.html If the query accepts a new row, but the subform does not, check the properties of both the main form and subform. Make sure AllowEdits is Yes in the main form, and AllowAdditions is Yes in the subform. If the source query contains any function calls, or if the form/subform contains any code, you may also need to check that your database is in a trusted location: * Office Button (top left) * Access Options (bottom of dialog) * Trust Center (left) * Trust Center Settings (button) * Trusted Locations (left) * Add new location (button) More info on adapting to A2007: http://allenbrowne.com/Access2007.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply...

Programically Create Sub-Form
Hope someone can help. I have a saved parent form containing an unbound sub-form. I set the SourceObject (form) after the Parent Form opens/loads. The sub-form (datasheet view) basically displays the results of a cross-tab query The cross-tab query is created dynamically (in code) as the column headings are subject to change. I therefore have to create a new form (in code) and add the necessary controls (fields) as per the fields in the cross-tab query. The reason why I want a form as the SourceObject of the sub-form is that it allows Event Procedures to be activated. Using a straight query (in my case a cross-tab query) as the SourceObject, I can't see how I can activate any click or double-click events in the query cells (I hope I'm wrong about this). I've now noticed that this approach doesn't work in an MDE file as the design mode is off. Any suggestions or work-arounds. Steve. On 19 Sep 2006 19:45:33 -0700, "superjacent" <superjacent@gmail.com> wrote: It is true that there is no code generation in MDE. Thank Bill for that :-) If you MUST have MDE, you have to relax your requirements. I haven't tried, but perhaps you can create a subform with the maximum number of fields, and then bind them on the fly based on how many columns your crosstab outputs. -Tom. >Hope someone can help. > >I have a saved parent form containing an unbound sub-form. I set the >SourceObject (form) after the Parent Form opens/load...

Copying existing to new records on Form with sub forms
Greetings, Forms programming not my specialty, appreciated any advice on my direction I'm going with this. Basic need my client has is to "clone" the existing 3 tables records being viewed on a 3 part Form-SubForm-SubSubForm. The 3 tables will each recieve very similar new rows with only a unique key being new to them. My current approach: Use a new button to trigger VBA code to build a SQL insert statement from the existing form's controls (txt fields, cbo boxes etc..); Insert the single new rows on each table; Force the new records to appear on the form and display a message confirming success. Assuming this is most efficient way, could use advice on auto- displaying the new rows. I suspect a new SQL select-join against the 3 tbls for the new rows, and a "Screen.ActiveForm.RecordSource = SQLText" to populate the form controls from that. Thanks for advice, I sure like this GOOG group Don F @ P.S.E. in Bellevue, Wa ...

Mulitple Main Forms Created by Sub Form Entries
Hi I'm hoping this is a problem just because I'm a beginner at Access, and so someone can help I have created a database of companies, with a subform for contacts. (seperate tables) It worked perfectly until I got more than one contact for a company! If I add a 2nd contact to the subform, when I go back into the database, Ive got 2 records of the main form for the company, with the subform, showing. Its not adding a second record to the company table, that just says I have 2 contacts attached, which is what I want. How do I stop the record, when I view the form , duplicating its...

Limit Sub Form records based on Main Form
I have an option group called Issue_Type on my main form F1_Member_Demographics_Main. When I select one of the 3 options on the main form from the option group Issue_Type I want to limit the sub form F2_Member_Issues records based on the combo box Issue_Code_T1. Option Group Issue_Type on main form: 1=Complaint 2=Grievance 3=Appeal Combo Box on sub form: 1=Complaint 2=Grievance 3=Appeal So if I select Complaint from the option group on the main form I only want to see Complaints on the sub form etc. Thanks in Advance Gary BEETHOVEN wrote: > I have an option group called Issue_Type on my main form > F1_Member_Demographics_Main. When I select one of the 3 options on the > main form from the option group Issue_Type I want to limit the sub > form F2_Member_Issues records based on the combo box Issue_Code_T1. > > Option Group Issue_Type on main form: > 1=Complaint > 2=Grievance > 3=Appeal > > Combo Box on sub form: > 1=Complaint > 2=Grievance > 3=Appeal > > So if I select Complaint from the option group on the main form I only > want to see Complaints on the sub form etc. > > Thanks in Advance > Gary Forms!MainFormName!SubFormName.Form.Filter = _ "Issue_Type = " & Me.Issue_Type Forms!MainFormName!SubFormName.Form.Filter = True Salad wrote: > BEETHOVEN wrote: > >> I have an option group called Issue_Type on my main form >> F1_Member_Demographics_Main. When I select one of the 3...

Requery Sub after update of another sub both on an unbound form
I have a unbound form with 2 subforms. It looks something like this _______________________________________________ | [Main} (Some Controls) | | | |_____________________________________________| | [Sub 1] | [Sub 2] | | | | | AIKey Other Data | Detail | | AIKey Other Data | Detail | | AIKey Other Data | Detail | | AIKey Other Data | Detail | | AIKey Other Data | Detail | | | | | | | | | | | | | | | | | | | | | | |_______________________________|_____________| BY setting the Control Source Property to a SQL Statement I'm able to get the correct values in each Subform. Sub 2, when it loads, looks at the AIKey value and pulls the correct detail. The initial display operates exactly like I want. The problem is when I go to the next record in [Sub1], [Sub 2] doesn't update. If I manually select a field in [sub 2] and do a Shift+F9 the field updates. Ok, I think, all I have to do is a requery of [Sub 2]. I can't for the life of me figure out how to ...

Forms and Form
Hi everyone ! 1) An example from help: "Each Form object has a Controls collection, which contains all controls on the form. You can refer to a control on a form either by implicitly or explicitly referring to the Controls collection. Your code will be faster if you refer to the Controls collection implicitly. The following examples show two of the ways you might refer to a control named NewData on the form called OrderForm: ' Implicit reference. Forms!OrderForm!NewData ' Explicit reference. Forms!OrderForm.Controls!NewData The next two examples show how you might refer to a ...

Sub Form record Access/navigatiion
Hi I have a form/subform where a new record is created on the subform by a button click. After the new record is created, I then need to go directly and display the new record in the subform. My current code is:- Private Sub cmdPanelInfoOnly_Click() On Error GoTo Err_cmdPanelInfoOnly_Click Dim strSql As String Dim dbs As Database Dim rsEpis As Recordset Dim intPat As Integer Set dbs = CurrentDb() strSql = "Select Max([Episode ID]) as MaxId from Episode;" Set rsEpis = dbs.OpenRecordset(strSql) [EpisID] = rsEpis.Fields("MaxId").Value + 1 DoCmd.SetWarnings False intPat = [Patient ID].Value DoCmd.OpenQuery "qinsEpisodeForPanelOnly" - Inserts the default values in the new record DoCmd.SetWarnings True [Forms]![frmpatient].Form.Filter = "[Patient]![Patient ID] = " & intPat [Forms]![frmpatient].Form.Requery 'This next bit works, but needs to be sped up!!!!! Do Until [subfrmEpisode].Form![Patient ID] = [intPat] DoCmd.GoToRecord , , acNext Loop Do Until [subfrmEpisode].Form![Episode ID] = [EpisID] subfrmEpisode.SetFocus DoCmd.GoToRecord , , acNext Loop Exit_cmdPanelInfoOnly_Click: Exit Sub Err_cmdPanelInfoOnly_Click: MsgBox Err.Description Resume Exit_cmdPanelInfoOnly_Click End Sub I cannot seem to find a more efficient way of navigating directly to the new sub form record Can anybody assist please Thanks Gary try: Dim frmS As Form [Episid] = DMax("MaxId", "E...

Forms/Subforms in MS Access Database
Why do my Forms/Subforms in my MS Access Database not appear? All I see is the boxes where they should show?! What did I do wrong? Thanks, John zufie wrote: > Why do my Forms/Subforms in my MS Access Database not appear? > > All I see is the boxes where they should show?! > > What did I do wrong? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Probably there isn't a name of a form in the sub-form's Source Object property. Also, the Link Child Fields and the Link Master Fields properties may be blank - you must enter the names of the link fields, they hold the field names that link the data between the forms. -- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA) ** Respond only to this newsgroup. I DO NOT respond to emails ** -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBSSsUjoechKqOuFEgEQL+dQCfYUSwXFtPj0RRSZO+q3J8lQCD0/UAniRz JKu0h9AG0BAg8W3wC/0BC7B3 =Kvva -----END PGP SIGNATURE----- On Nov 24, 2:54=A0pm, MGFoster <m...@privacy.com> wrote: > zufie wrote: > > Why do my Forms/Subforms in my MS Access Database not appear? > > > All I see is the boxes where they should show?! > > > What did I do wrong? > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Probably there isn't a name of a form in the sub-form's Source Object > property. =A0Also, the Link Child Fields and the Link Master Fields > properties...

Making MS Access Form as a standalone form like in VB
Well, its sames difficult for me; I love access so much and wish to make it perform extra task. I prepared an HTML form but can not connect it to my access table and so I think it is possible to make an access form a standalone form for user input. Can anyone assist. My mail add is dianafather@aim.com. *** Sent via Developersdex http://www.developersdex.com *** Oscar, why don't you just code up a VB form for user input and connect it to an Access backend? To my knowledge, you can't force an Access form to exist outside of Access. Your users would have to open the Access file to ent...

Main Form / Sub Form search issues with combo boxes
Hello- I have a main form "Customers", with two sub forms "Items" & "Transactions"= .. The forms are all linked through the key fields of ShipDate & AccountNum. T= ransactions form is linked to Customers, and Items is linked to Transaction= s. The account number combo box in the header of the Customer form functions f= ine. I have combo boxes on the headers of the subforms that work when used = on the subform alone, but when used as a part of the Customers form, they w= ill not work correctly. The Transactions subform has an Invoice # combo box= , and the Items subform has a Sequence # combo box. I cant get the records in all 3 forms to display the intended record when u= sing the subform search boxes. The VBA for the controls is shown below. Customer Form (Main) Private Sub cboFindAccount_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs =3D Me.Recordset.Clone rs.FindFirst "[AccountNum] =3D " & Str(Me![cboFindAccount]) Me.Bookmark =3D rs.Bookmark End Sub For the Transaction subform Private Sub cboFindInvoice_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs =3D Me.Recordset.Clone rs.FindFirst "[InvoiceNum] =3D " & Str(Me![cboFindInvoice]) Me.Bookmark =3D rs.Bookmark End Sub For the Items subform Private Sub cboFindSequence_AfterUpdate() ' Fi...

Web resources about - Sub-forms of Sub-forms - comp.databases.ms-access

Resources last updated: 3/21/2016 2:58:32 AM