Runtime Error '3075'



Hi, All : I borrowed Allen Browne's code to track Deletes, Edits, and
Inserts on a Form, I did modify to suit the needs,
However, I got a Runtime error "3075' syntax error in date in query
expression', the query expression lists in the following

Any idea to fix it?


sSQL = "INSERT INTO " & sAudTmpTable & " (audType, audDate, audUser,
[ID#], [Dod#], title, [Rev#], sectitle, " & _
"critreq, d1, d2, d3, d4, Internal_comments)" & _
"SELECT 'edit from 'AS audType, Now() AS audDate, strUserName AS
audUser, sTable.[ID#], sTable.[Dod#], " & _
" sTable.title, sTable.[Rev#], sTable.sectitle, sTable.critreq,
sTable.D1, sTable.D2, & _
" sTable.D3, sTable.Discipline4, sTable.Internal_comments" & _
" FROM " & sTable & " WHERE ((" & sTable & "." & sKeyField & "
= " & lngKeyValue & ")" & ");"


Above expression is working properly as an append query in Access query
design, but would get a Runtime error if the coding was placed within
the Form.

Thanks in advance for the help.

.



Relevant Pages

  • Re: Queries Dont Allow Edits
    ... This is my first time creating queries in Access 2002. ... If you could advise me on how to fix the query to allow the data ... properties and made sure that edits, additions, and deletions are ...
    (microsoft.public.access.queries)
  • Re: Same date range in main and sub form
    ... I tried it immediately but I got a Runtime Error ‘3075’ “Syntax ... If you use the parameters StartDate and EndDate in the query, ... You could put them as unbound text boxes on the main form, ...
    (microsoft.public.access.forms)
  • Allowing Edits in Form
    ... A query is supplying the data to the form. ... >>The form opens, but does not allow edits. ...
    (microsoft.public.access.forms)
  • Re: Theoretical question
    ... we usually use a query that has fields from ... The difference is that a report is only reading the data and not trying to ... make edits or insertions. ... It is easier to include multiple tables if you are only ...
    (microsoft.public.access.forms)
  • Re: Runtime Error 3075
    ... runtime error was caused by missing quotes at the WHERE clause which it ... ONLY when you can copy the result into query designer's SQL view & have it ... I got a Runtime error "3075' syntax error in date in query ... design, but would get a Runtime error if the coding was placed within ...
    (microsoft.public.access.queries)