I am using InfoPath to query two different tables. The SQL syntax itself is fine. The SQL syntax is:
SELECT PurchOrd.PONbr,PurOrdDet.InvtID from PurchOrd JOIN PurOrdDet ON PurchOrd.PONbr=PurOrdDet.PONbr WHERE PurchOrd.PONbr LIKE '%" + PONbrId + "%' AND PurchOrd.ProjectID LIKE '%" + ProjectId + "%' AND VendName LIKE '%" + VendorNameId + "%' AND PurchOrd.ReqNbr LIKE '%" + PRNbrId + "%' AND PurchOrd.User6 LIKE '%" + ReqId + "%'
When I click the button, all of the fields that are in the PurchOrd table show textboxes, even if I did not select the field data to be shown. The fields for the PurOrdDet table do not show up, even if I selected them to be shown. Both tables are in the same datasource. I have even tried using separate datasources and using a join statement in the SQL but it still does not work.