I've created a recordset based on 2 tables (orders & customers) but i can't access a specific field. here's the sql statement:
strsql = "SELECT * from t_orders, t_Customers WHERE t_orders.orderstatus = 'New' AND t_orders.customerid = t_customers.customerid"
in my code, i need to access the field "contactname" which exists in both tables, and i get an error message saying that the field doesn't exist. i tried changing the sql statement to:
strsql = "SELECT *, contactname from t_orders, t_Customers WHERE t_orders.orderstatus = 'New' AND t_orders.customerid = t_customers.customerid"
and afterwards, i received an error message saying: "the specified field could refer to more than one table listed in the FROM clause of your sql statement"
how do i access the field "contactname"....?
any help would be greatly appreciated!
strsql = "SELECT * from t_orders, t_Customers WHERE t_orders.orderstatus = 'New' AND t_orders.customerid = t_customers.customerid"
in my code, i need to access the field "contactname" which exists in both tables, and i get an error message saying that the field doesn't exist. i tried changing the sql statement to:
strsql = "SELECT *, contactname from t_orders, t_Customers WHERE t_orders.orderstatus = 'New' AND t_orders.customerid = t_customers.customerid"
and afterwards, i received an error message saying: "the specified field could refer to more than one table listed in the FROM clause of your sql statement"
how do i access the field "contactname"....?
any help would be greatly appreciated!