No video

Microsoft Access A to Z: Everything you need to know about subforms

  Рет қаралды 8,102

Lisa Friedrichsen

Lisa Friedrichsen

Күн бұрын

This short KZfaq covers the how and why of subforms. Subforms are powerful in that they display valuable information on a form -- related data. But subforms are also very misunderstood because they can be created in multiple ways and the properties that connect a subform to a main form are not obvious. In this KZfaq we'll create subforms in three ways and examine the key properties that connect a subform to a main form by studying the Link Master Field and Link Child Field properties. We'll also examine the Default View property which determines how a form or subform displays its data.
All of my KZfaqs can be found at: learncs.w3spac...

Пікірлер: 24
@cha1868
@cha1868 Жыл бұрын
forgot the exact place to click to see the Link Master Fields and Link Child Fields parameters. Thanks to this video I found it again. Thanks Sensei :)
@lfriedrichsen
@lfriedrichsen Жыл бұрын
Thanks! You can find a listing of all of my KZfaqs at learncs.w3spaces.com
@alializadeh8195
@alializadeh8195 7 ай бұрын
Thanks
@lfriedrichsen
@lfriedrichsen 7 ай бұрын
You're welcome! All of my KZfaqs are organized at learncs.w3spaces.com. Take care, Lisa
@Supernyv
@Supernyv 7 ай бұрын
Nice! Thank you very much
@lfriedrichsen
@lfriedrichsen 7 ай бұрын
You're welcome! All of my KZfaqs are organized at learncs.w3spaces.com. Take care, Lisa
@jim27105
@jim27105 Жыл бұрын
Hi Lisa, I'm curious if there's a setting that would allow the subform to display the count of records, but not allow the user to click the left/right arrows to advance. It seems redundant in my situation because there's a vertical scrollbar on the right. I don't want to give up the record count though. :-) For example at around 6:50 your subform shows 3 records. I'd still like to see 1 of 3 but hide or disable the left right arrows.
@lfriedrichsen
@lfriedrichsen Жыл бұрын
A form's Navigation Buttons property (Format tab) shows the navigation bar (Yes) or hides it (No), but as you probably already know, changing that property value to No affects the entire navigation bar. I don't believe there is a property that disables only the left/right arrows on the navigation bar. But note that the navigation bar not only provides left/right arrows, it also has buttons for "First record," "Last record," and "New (blank) record" which are probably faster and more precise than using the scroll bar to move to these locations. In addition, the navigation bar provides a button to apply/remove a filter as well as a box to search for specific data.
@jim27105
@jim27105 Жыл бұрын
@@lfriedrichsen thanks I got around it by using Dcount in a text box. I appreciate the reply.
@satyabanukil779
@satyabanukil779 9 ай бұрын
Respected Madam, your earlier advice on report subtotals was quite helpful to me. This time have a simple query. Suppose i have a main form field called "score", a numeric. In the subform have another similar field with a different name. Now i want to update the subform field "if" the main form field value is greater than 25 (example) which means the subform updates based on the condition of the field in the main form. I tried but not working as I'm probably giving an incorrect syntax. Shall be grateful if advised. Regards
@lfriedrichsen
@lfriedrichsen 9 ай бұрын
You'll need to use the IIF function to do the "if" test. As for the syntax of how to build an expression using fields from both the main form and subform, I recommend using the Expression Builder to fill in the Control Source property for the different field in the subform. In the Expression Builder, pick through the Forms in the first pane of the dialog of the Expression Builder dialog box and double-click the main form to provide the correct synatx. It will look something like this: =IIf([Forms]![NameOfMainForm]![score]>25, true, false)
@satyabanukil779
@satyabanukil779 9 ай бұрын
@@lfriedrichsen Thnx Madam for your prompt and kind advice. I tried the way as advised. But it is showing an error message " ...cannot find the object Table2 (my form name from which the data to be brought to the other form). So I think I am making some mistake in putting the code correctly. In fact the first tabular form I have two fields (Pair No and Score, both numeric fields). In the first form in the first Row the data against Pair No is 1 and the score against 1 is 10. In the same form, in the second row Pair No is 2 and Score is 20. In the second tabular form I have a field SCR1 and SCR2. I want to update the second form SCR fields based on the score corresponding to the "Pair No' of the first form. For example, SCR 1 will be 10 (taking it from the first row of the first form corresponding to the Pair No). Regards.
@lfriedrichsen
@lfriedrichsen 9 ай бұрын
I "think" your trouble is that you're trying to pull data from two different records from the main form (which I "think" you've named Table2, a confusing name for a form given the word "table" means something else in Access) into the subform. I "think" you need to work with a query to gather all of the data you want to examine at one time into a single record on the main form. Not sure, but this is the best I can do on KZfaq. If you were a paying client we'd be talking further. Good luck.
@sharmaneaurora6332
@sharmaneaurora6332 2 жыл бұрын
Hi, can you please show me a code that will set focus on the first control in the subform when you tab out of the last control in the main form without clearing the data entered on the main form? I tried to set focus on the subcontrol in lastmainfform_lost focus event but it won't work☹️
@lfriedrichsen
@lfriedrichsen 2 жыл бұрын
Me.Parent!MainFormName.SetFocus
@bevansmith9108
@bevansmith9108 10 ай бұрын
Hi Lisa, I find your tutorials very helpful. Regarding subforms, the Form Wizard doesn't create Combos. I have Students in the main form as Combo box. If I change a text field (Classes) on the subform to a combo box it breaks the connection and I don't seem to be able to get it back. Any ideas appreciated.
@lfriedrichsen
@lfriedrichsen 10 ай бұрын
First off, the Form Wizard WILL create a combo box for a field that has Lookup properties in Table Design View. It sounds like you have a relationship problem between your Students and Classes table. Typically, that takes an intermediate Enrollment table given one student can take many classes and one class can have many students. If that's the case, you'd need to add foreign key fields to the Enrollment table to connect to both the Students and Classes tables. Once your relationships are correct, the Form Wizard will create solid forms and subforms.
@bevansmith9108
@bevansmith9108 10 ай бұрын
@@lfriedrichsen Thank you so much for replying - amazing! It took me a long time but I worked out having enrollment table to resolve the Many to Many. On Student table have StudentID and Student Name fields (plus others). On Enrolment table have EnrolmentID and StudentID and ClassID which is a foreign field from Class table. Which table fields need to be Lookup that your refer to. This might be a good video for you to produce as I am sure others battle this one.
@lfriedrichsen
@lfriedrichsen 10 ай бұрын
Good job. Another thought -- if your classes are repeated, you may also need a Sections table between the Classes and Enrollments tables. One class can have many sections and one section can have many enrollments.
@lfriedrichsen
@lfriedrichsen 10 ай бұрын
Once the tables and relationships are properly designed, then the Form Wizard will create proper forms/subforms to show the data that you select in the wizard.
@lfriedrichsen
@lfriedrichsen 10 ай бұрын
As far as Lookup fields, those are always the foreign key fields. So the StudentID field in the Enrollments table would be a good candidate for Lookup properties. I do already have many KZfaqs on these subjects. Please see all of my KZfaqs organized at... learncs.w3spaces.com
@joselopes6698
@joselopes6698 2 жыл бұрын
Amazing!...
@lfriedrichsen
@lfriedrichsen Жыл бұрын
You're welcome! You can find all of my KZfaqs organized at learncs.w3spaces.com/
@helenarozane3653
@helenarozane3653 3 ай бұрын
es jus updatoshu vai es dabusu sekmigi programmesana #pray for me
Microsoft Access A to Z:  Forms and command buttons
9:23
Lisa Friedrichsen
Рет қаралды 4 М.
MS Access Many-to-Many Edit Form (Abridged version)
14:41
CodeHawkins
Рет қаралды 7 М.
The Joker kisses Harley Quinn underwater!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 13 МЛН
Nurse's Mission: Bringing Joy to Young Lives #shorts
00:17
Fabiosa Stories
Рет қаралды 3,1 МЛН
Microsoft Access A to Z: Relating tables
11:46
Lisa Friedrichsen
Рет қаралды 10 М.
Access  Form With a Subform and Calculated Fields
31:58
Officeinstructor
Рет қаралды 69 М.
Using Access to Build Relationships, Queries, Forms, and Reports
7:05
Microsoft Access A to Z: Designing Table Relationships
10:40
Lisa Friedrichsen
Рет қаралды 66 М.
How to Create a Subform in MS Access
9:30
Sean MacKenzie Data Engineering
Рет қаралды 4,8 М.
How to Create a Form with a Subform to Show Related Records in Microsoft Access
29:19