Query syntax error 3075



Hi all,

Can someone please tell me what's wrong with the following query
I get the error 3075 "something is wrong with the syntax"

sql_HTRecords = "select * from Orders where FPrint = '" & "J'" & _
"AND HTDMAD > #" & Format$(datereminder, "mm-dd-yyyy") & "#" & _
"AND PerBank Is Null "

It's a copy from the one below and that one works fine

sql_HTRecords = "select * from Orders where FPrint = '" & "J'" & _
"AND FDate < #" & Format$(TDate, "mm-dd-yyyy") & "#" & _
"AND PerBank Is Null "


I belief that the datevariable HTDMAD is incorrect because i replaced FDate
with HTDMAD
FDate is information from the database (access 2003)

Why is HTDMAD wrong in the query

T.i.a.

Regards

Tino Wintershoven
The Netherlands


.



Relevant Pages

  • RE: EXISTS reserved word in FROM clause
    ... we make a good pair because I know Access SQL ... from what you described the query syntax that I ... >The subquery should return the records: ...
    (microsoft.public.access.queries)
  • Re: Exclusive Form
    ... You're using the syntax for an UPDATE query, ... "'", dbFailOnError ... I created a new table called FormLock with one field named ...
    (microsoft.public.access.formscoding)
  • Re: Bizarre subquery syntax problem
    ... With Access, the official syntax for a subquery always requires an alias, so ... SELECT p.AS UID, p.Firstname AS Firstname, p.Lastname AS Lastname, ... I am seeing bizarre problems with a subquery. ... core query runs fine- ...
    (microsoft.public.access.queries)
  • Re: PSP
    ... I'd be interested in your opinions on syntax of PSP... ... Furthermore, if a query fails, it does not ... > look like it allows the programmer to directly mix the Prolog and HTML. ... Another downside is that predicates cannot be ...
    (comp.lang.prolog)
  • Re: Update top n records
    ... Whenever I'm having problems with the correct syntax, ... to the query design window to see the code. ... "Jeff Boyce" wrote: ... All widgets have a number and are in numerical order in inventory. ...
    (microsoft.public.access.formscoding)