Getting CurrentRecord from a table in a subform

access vba recordset current record number
access subform refer to main form
access vba set current record
subform control name
ms access refer to parent form from subform
access get current record id
access subform control
access vba select subform

I have a company form that list their basic info with a subform tab that list more company info like contacts, parts and orders. I use a tab control where each tab has a table with basic info about each. I am trying to open another form that has detailed information about the user highlighted row in the table, but cannot figure out how to read which row is selected.

The form is call Customer, the tab form is called tabDetails, the parts tab is caled tabParts and the table that lists all the parts for the company is called tblPartsList.

This is what I thought would work.

ID = Me!tabDetails!tabParts!tblPartsList!CurrentRecord![ID]

Use the Form property of the subform control.

tabDetails here is the name of the subform control:

ID = Me!tabDetails.Form![ID].Value

or:

ID = Me!tabDetails.Form!tblPartsList.[ID].Value

The form's tabs are only for ordering the controls. They are not containers for these.

ms access - Getting CurrentRecord from a table in a subform, I have a company form that list their basic info with a subform tab that list more company info like contacts, parts and orders. I use a tab control where each tab  You can use the CurrentRecord property to identify the current record in the recordset being viewed on a form. Read/write Long. Syntax. expression.CurrentRecord. expression A variable that represents a Form object. Remarks. Microsoft Access sets this property to a Long Integer value that represents the current record number displayed on a form.

The solution that I found to work was just to call the table control.

ID = tblPartsList![ID]

Thanks for everyone's help.

Retreiving a field from the current record in a subform, not available unless the subform's datasource is a table or query itself. I need to get hold of the value in a particular field of the current record  Hi, I'm new to thescripts.com. I'm also new to MS Access and I have been struggling with what seems to be an easy task. I have a subform that displays query results. I am wanting to be able to get the Currentrecord of the subform that is selected. For some reason, it is returning "1" everytime when I do a me.currentrecord.

You can use ActiveControl property to refer to the control that has the focus at runtime

ID= Screen.ActiveControl.Parent("ID")

New Perspectives on Microsoft Office Access 2007, Brief, Customer table (for Lily's Boutique) becomes the current record in the main form. The subform shows that this customer currently has no contracts; recall that you  Ie First table row is displayed then text from subform, then 2 nd table row followed by same text from subform, then 3 rd table row followed by subform, and so on. But we need is this Subform (text element inside it) should be displayed only for first row. Hence on the Subform, in the event Form Ready (or Layout Ready) we tried to used

New Perspectives on Microsoft Office Access 2007, Introductory, Access displays only the table name for the subform itself, but displays the 41 in the Customer table (for Lily's Boutique) becomes the current record in the  Identify the source of the data to be displayed in the subform. Select the Orders table and click Next. Choose the Orders table, add all the fields to the subform by clicking the double chevron button, and click Next. The Subform Wizard will show how the two tables are related, using the Customer ID field. Because you previously built the table relationship, the Subform Wizard will always know how this should be done. Click Next.

Enable a form with sub-forms to see all records rather than only one , The form displays general data about an issue and each tab/sub-form This I get​, but what I want to know is if anyone has ideas for how to work around this. Ideally I'd like the user to be able to navigate through ALL records in the table via the the associated records that relate to the current record on the primary form. Hello ! I have a form: frmMain.In this form a subform: frmSubform. When I navigate in frmMain the records in frmSubform are changed adequately. Well done ! Now, I wish to create a string by concatenate the records (from a certain field) from this subform.

Form.CurrentRecord property (Access), You can use the CurrentRecord property to identify the current record in the recordset being viewed on a form. Read/write Long. Syntax. I have 2 subforms in access 2010 database; Based on selection of subform1 field value , the vba program will run the subform2 output which common text fields in subform 1 and 2 as "supplier_name". So, I tried the "on double click" event on subform1 to write the currentRecord method see below,