Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    BETWEEN statment (A2K_SR_1)

    GRRR....
    I am trying to set up a quasi-pop-up box with cmd buttons for each month. I don't want the users to have to ender BEGIN MONTH DATE and END MONTH DATE parameters. I have the following code set for JANUARY button:

    ---code starts---
    Private Sub cmdJAN_Click()
    MyDate1 = Format(Date, "YY")

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BETWEEN statment (A2K_SR_1)

    strSQL = "WHERE tblNEW.DATE Between" & xbegin & " and " & xend
    should be :
    strSQL = "tblNEW.DATE Between " & xbegin & " and " & xend

    Insert a space after between and WHERE is not needed when you use DoCmd.OpenReport
    Francois

  3. #3
    New Lounger
    Join Date
    Aug 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BETWEEN statment (A2K_SR_1)

    Thank you...

    I've been staring at this piece of code all AM

    Brad

Posting Permissions

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