Results 1 to 3 of 3
  1. #1
    Vol71 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    7

    Query Field Name Snytax Error


    I have an input form named "Report Center" that runs a query that generates reports, and I am trying to get the query to filter the Issue date by a date range based on 2 text boxes named "Beginning Date" and "Ending Date". I have multiple ways to filter my results on the input form that need to be independent from one another. My understanding is that I have to add an additional field with the field name surronded in [...]. Whenever I try to enter the code listed below, I get a message that my expression has invalid syntax and I may have entered a comma without a preceding value or identifier.


    [Issue Date]= Between Nz([forms]![Report Center].[Beginning_Date],#1/1/1900#) And Nz([forms]![Report Center].[Ending Date],#1/1/2100#) Or[Issue Date] = Between Nz([forms]![Report Center].[Beginning_Date],#1/1/1900#) And Nz([forms]![Report Center].[Ending Date],#1/1/2100#) Is Null

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You don't want the =, and I'm not sure what the second bit is supposed to accomplish.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Vol71 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    7
    This issue somehow fixed itself. The date range code had to be placed on the criteria line.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 03-27-2014, 08:38 AM
  2. Replies: 3
    Last Post: 09-05-2012, 10:23 AM
  3. Snytax Error - Counting a Not Null field
    By Huddle in forum Access
    Replies: 2
    Last Post: 06-29-2012, 12:30 PM
  4. Overflow error - change field type in query?
    By Lady_Jane in forum Queries
    Replies: 6
    Last Post: 05-25-2011, 01:10 PM
  5. Replies: 0
    Last Post: 03-18-2010, 01:31 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums