I did see the first image showing table relationships. The second image is not something I am familiar with. It appears to be showing associated table adapter objects/properties/whatever. So query does not 'reside' in table, table is simply used within a query. Symantics
Code maybe something like:
Code:
strSQL = "SELECT tblSourceMaster.intSiTechID, tblSourceMaster.strVendorName,tblSourceMaster.strVendorID " & _
"FROM ((lnkItemVendor " & _
"INNER JOIN tblItemMaster ON tblItemMaster.intSiTechID = lnkItemVendor.intSiTechItemID) " & _
"INNER JOIN tblSourceMaster ON tblSourceMaster.intSiTechID = lnkItemVendor.intSiTechVendorID) " & _
"WHERE (lnkItemVendor.intSiTechItemID = " & Me!intSiTechID
Using cmd As New OleDbCommand With {.Connection = cn}
cmd.CommandText = strSQL
At least I would construct SQL statement referencing form control/field for dynamic input like that in VBA.