Note that there are some explanatory texts on larger screens.

plurals
  1. POMS Access. ADO recordset for subform. Child relationship set up programatically. Won't automatically fill in field
    primarykey
    data
    text
    <p>I have a form/subform for inputting data into an ado table. The main form's recordset is a local table of Widgets and information about the widgets (WidgetID, WidgetName, size, color, location, etc). I am inputting test data (multiple tests per widget, all with unique dates) through the subform which is connected to an ADO recordset to a table called Tests. I have a combo box, findWidget, in the main form where the user can choose a WidgetID and it updates some info on the main form. I have also written VBA code to do the job of the parent/child relationship to change the recordset of the subform to only show the Tests that correspond to that WidgetID. However, There is a field for the WidgetID in the subform that I would like to be filled in automatically when i choose the WidgetID in the main form. This just worked before I applied the ADO recordset (i was using two local tables), and I set up a parent/child relationship. However, with ADO it seems parent/child doesn't work so I have to vba it. Here is the code I have tried, this is for when the subform loads:<br> <code>Private Sub Form_Load()<br> Me.UCI = Forms!InputMainForm.findWidget<br> End Sub</code><br> The code executes with no errors, but the control in the subform is not updated. It is just blank upon loading the form. Maybe the code should be in the after update of the findWidget combo? I dont know. If I put it there I'm not really sure how to refer to the controls of the subform. Any ideas?<br> Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload