Results 1 to 4 of 4

Thread: [RESOLVED] Error 20515 A date is required here.

  1. #1

    Thread Starter
    Lively Member Carmell's Avatar
    Join Date
    Dec 2015
    Posts
    105

    Resolved [RESOLVED] Error 20515 A date is required here.

    Name:  untitled.JPG
Views: 1802
Size:  18.6 KB

    I'm getting this error when generating report.

    The error falls in this line.

    Code:
                .SelectionFormula = "{View_MasterInfo.EmployeeType} <> 'RANK & FILE' and {View_MasterInfo.DateHired} <= '" & DTPicker1.Value & "'"
    What do you think I'm missing?

  2. #2
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Error 20515 A date is required here.

    The quotes around the date don't seem paired...

    <= '7/23/2018
    Please remember next time...elections matter!

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Error 20515 A date is required here.

    Which database (Access, SQL, etc) are you using? Some may require a symbol surrounding the data, i.e., #date#

    Edited: Is this Crystal Reports? There is a another part of the forums dedicated to that.
    http://www.vbforums.com/forumdisplay.php?33-Reporting

    Does CR require a Date() function, i.e., "... <= Date(" & Format(dtPicker1.Value, "yyyy,mm,dd") & ")"
    Last edited by LaVolpe; Jul 23rd, 2018 at 05:52 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4

    Thread Starter
    Lively Member Carmell's Avatar
    Join Date
    Dec 2015
    Posts
    105

    Re: Error 20515 A date is required here.

    Thank you guys for your help.

    I solved the problem using Lavolpe solution.


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
  •  



Click Here to Expand Forum to Full Width