I have a form "frmSearch", it contains an ADODC, multiple comboboxes and a text box infront of each combo box. Here is a picture of that.

Name:  FrmSearch.PNG
Views: 626
Size:  17.1 KB

The form will use an ADODC to full combobox with all the available fields in that ADODC, and the combobox together with textbox infront of it will narrow down records in adodc according to search criteria

I've got multiple forms that contain multiple ADODCs each. Usually 2 or 3 ADODC each.
They all load the form "frmSearch" when the button "cmdSearch" is clicked. I want to send a specific adodc in from each form to "frmSearch", so it can fill the combo boxes.

The problem I'm having is how will the "frmSearch" know which ADODC in a form to alter. The form "FrmCustomer" contain 2 ADODCs, "adoCustomer", and "adoCustomerContact". I can't just do the following and use the variable to access that particular ADODC.

(Form Customer)

Public ADO as string

Private Sub Command1_Click()
End Sub