I have a Form, with a SubForm as Continous Form in DataSheet.
Main form: frm_bitacora
SubForm: sfrm_bitacora
When I select a row from sfrm_bitacora I have the code:
So it shows me the value from the fieldname from the table "tb_machine".
Now in my main form, in the footer detail, I have some fields that are from tb_report.
What I want is when I select the value from the datasheet, in the footer detail change the values as a query, I mean, I want to return the values from tb_report depending on the selected data.
Note: tb_report my primary key is "ID_Report". Note: tb_machine my primary key is "Machine_name", but I also have a column named "ID_report" in my logical mind I made this to connect both tables.
This is an Image. htt p ://i.stack.imgur.com/EL9LF.jpg
Main form: frm_bitacora
SubForm: sfrm_bitacora
When I select a row from sfrm_bitacora I have the code:
Code:
1. Private Sub Form_Click()
2. MsgBox Me.id_report.Value
3. End Sub
So it shows me the value from the fieldname from the table "tb_machine".
Now in my main form, in the footer detail, I have some fields that are from tb_report.
What I want is when I select the value from the datasheet, in the footer detail change the values as a query, I mean, I want to return the values from tb_report depending on the selected data.
Note: tb_report my primary key is "ID_Report". Note: tb_machine my primary key is "Machine_name", but I also have a column named "ID_report" in my logical mind I made this to connect both tables.
This is an Image. htt p ://i.stack.imgur.com/EL9LF.jpg