3MGrant5,
What may need to do is build your query in the Grid Editor and you should come up with something like this for an "Append Query."
You probably don't need the "setwarnings" stuff.
code:
$AC1.DoCmd.SetWarnings False
$AC1.RUNSQL = "INSERT INTO PhoneDirectory ( Name, Area, Ext, Login, Email ) SELECT DISTINCTROW [All].[Display name], [All].Company, [All].Phone, [All].Alias, [All].Alias FROM [All] LEFT JOIN PhoneDirectory ON [All].Alias = PhoneDirectory.Login WHERE (((PhoneDirectory.Login) Is Null))"
$AC1.DoCmd.SetWarnings True
However, you may need to do some debugging with the query (note the chr(34)'s)..
code:
$AC1.DoCmd.SetWarnings False
$AC1.DoCmd.RunSQL "INSERT INTO ErrorLog ( TStamp, Loan, ErrorMessage ) SELECT Now()," & Chr(34) & loan_nm & Chr(34) & "," & Chr(34) & oDTrac.ErrorMsg & Chr(34) & ";"
$AC1.DoCmd.SetWarnings True
HTH,
- Kent
[ 09 May 2002, 23:25: Message edited by: kdyer ]