Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2003
    Location
    UK
    Posts
    85

    Question Unanswered: Can you please correct this statement for me

    Here is the statement.

    DoCmd.OpenReport "R_Summary Report", acViewPreview, , "[ANALYSIS DATE] = > #12/31/1999# " Or "[ANALYSIS DATE]Is Null" And [PARTS TYPE] = " #Fuel# "
    OrderBy ([ANALYSIS DATE])


    [ANALYSIS DATE] is a date field
    [Parts type] is a text field
    Want to filter the data by '>12/31/1999' on [ANALYSIS DATE] and
    by text 'Fuel' in [PARTS TYPE] field

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    And what is wrong with it?

  3. #3
    Join Date
    Mar 2003
    Location
    UK
    Posts
    85
    When I click on command button, it says

    'Microsoft cannot find field 'i' referred to in your expression.'

    symbol 'i' in the pop up message is actually a straight line (I could not find it on my key board)

    Thanks

  4. #4
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: Can you please correct this statement for me

    Originally posted by dbase
    Here is the statement.

    DoCmd.OpenReport "R_Summary Report", acViewPreview, , "[ANALYSIS DATE] = > #12/31/1999# " Or "[ANALYSIS DATE]Is Null" And [PARTS TYPE] = " #Fuel# "
    OrderBy ([ANALYSIS DATE])


    [ANALYSIS DATE] is a date field
    [Parts type] is a text field
    Want to filter the data by '>12/31/1999' on [ANALYSIS DATE] and
    by text 'Fuel' in [PARTS TYPE] field

    I know that there are people on the forum that live and breath SQL but I'll take a stab at it. Is this what you are looking for?

    DoCmd.OpenReport "R_Summary Report", acViewPreview, , "([ANALYSIS DATE] >= #12/31/1999#) Or " & _
    "([ANALYSIS DATE] Is Null And [Parts type] = ""Fuel"") OrderBy [ANALYSIS DATE])"

    Gregg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •