Dear Kingfisher, The easiest way to check SQL is to step through the code, get the SQL and open a query window, change the view to SQL and drop it in there. You can change to the design view, correct it and then copy the SQL back into your code. If it won't change view, your SQL is incorrect. Create the query in the design view, get the records you want , switch to the sql view and get your corrected SQL to go back into your code.
Kind regards Peter Peter T. Fairchild Consultant en Informatique [EMAIL PROTECTED] +41-(0)79-715-9155 Portable +41-(0)21-800-4044 Office "Form and Function are one" Frank Lloyd Wright 1867 - 1959 kingfisher2xx4 wrote: > I am trying to write a query in VB for an Access Module and keep > getting an error on the join. Specifically "Join expression not > supported." > > Here is the text I an assigning to the ADO command : > > > "INSERT INTO CTimeReportTbl ( Timecard!EmpID, TimeCardHours!ateWorked, > TimeCardHours!Minutes, TimeCardHours!RateIDLookUpTimeCardHours! > CompCode ) SELECT TimeCard!EmpID, TimeCardHours.DateWorked, > TimeCardHours!Minutes,TimeCardHours!CompCodeLookUp FROM (TimeCard > INNER JOIN TimeCardHours ON TimeCard!TimeCardID = TimeCardHours! > TimeCardID) WHERE (((TimeCard!EmpID) = [Forms]![TC_Select_Form]![EmpID > Combo]) And ((TimeCardHours!CompCodeLookUp) = 'CTA' Or (TimeCardHours! > CompCodeLookUp) = 'CTU')) ORDER BY TimeCard!EmpID, TimeCardHours! > DateWorked;" > > Your help is greatly appreciated! > > > > > Yahoo! Groups Links > > > > >
