0

I apologize if this is an easy one, but I can't find this on the web anywhere!

I have a list of tables and queries, and a full list of fields from each table and query.

I want to choose my fields in an Access form, and then, on another form, choose a query/table in one column (along with a field) and join it to a table/query in another column (along with the field.) My form for the joins would look like this:

Object1 Field1 Object2 Field2

and so on. I would want to be able to choose my fields through combo boxes, THEN make the SQL string dynamically. I can't use a where clause -- it has to be a join.

The problem is, the structure will change every time. Access gets funny about putting in parentheses. Also, if an object is chosen more than once, Access will want to join it (assuming I do it right) in a different manner than T-SQL.

Is there a way to write a query in T-SQL, and quickly convert to Access? Does anyone know the FROM clause algorithm Access uses to construct the FROM clause? I am stuck here, and I cannot find a solution to save my soul! Thank you in advance, David

David
  • 21
  • 6
  • What you are describing is called *a SQL Compiler*, parsing T_SQL and outputting Access-SQL. Writing one for T-SQL even to cover the modest functionality of Access-SQL is far beyond the scope of his site. – Pieter Geerkens Jul 26 '14 at 22:14
  • Why don;t you use the tools in Access to do this rather than writing your own – mmmmmm Jul 26 '14 at 23:03

0 Answers0