I created two smaller tables but I have another problem now...
I added a Where a clause and an Order By clause at the end of the SQL statement created by Infopath the query and it worked fine using one table as the Main Data Source. But now that I am uisng 2 smaller tables, the query is using Shape Select with an Append Select and a Relate clause at the end of the SQL statement. When I use the Where a clause and an Order By clause I get the following error...
The following error occurred:
The query method on the Document object failed.
InfoPath cannot run the specified query.
[0x80040E14][MSDataShape] Data shape command text contains a syntax error at or near position 2237 in the command. The text near the error is: " [LaborSummaryID] WHERE (((LaborSummary.[ECAM])".
File:script.js
Line:73
I think the Where a clause and an Order By clause needs to be after the Relate statement but I do not know how to do that since the SQL statement is generated by Infopath. I just put it at the end when I was using one table, which did not create the Relate statement, and it worked fine.
Can you help?