Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Between not working, please help

Discussion in 'Information Technology' started by Gina Whipp, Jul 28, 2006.

  1. Gina Whipp

    Gina Whipp
    Expand Collapse
    Guest

    DoCmd.OpenReport "rptHistoricalTime", acPreview, , Between " &
    Me![cboStartWeek] & " And " & Me![cboEndWeek] & ""

    I have tried to concate this thing ten ways from SUnday and can't get the
    Between to work. The two fields are numeric. I have tried searching the
    newsgroup and can't find anything to help me figure out what I am doing
    wrong.

    Thanks in advance!
    Gina Whipp
     
  2. Loading...

    Similar Threads Forum Date
    How Did Sikh Heritage Become Hostage To Hostilities Between India And Pakistan? Hard Talk Jun 26, 2016
    Is There A Thin Line Between Love And Hate? Interfaith Dialogues Apr 25, 2016
    what happened in between Blogs Oct 16, 2015
    Sikh Marriage Between Man & Woman Sikh Sikhi Sikhism Jul 1, 2015
    Difference between us and the Gurus? Sikh Sikhi Sikhism Dec 25, 2014

  3. Ken Snell \(MVP\)

    Ken Snell \(MVP\)
    Expand Collapse
    Guest

    You're missing a " character to left of Betwen, and you do not specify the
    field that is to be filtered, and you don't need the trailing " character:

    DoCmd.OpenReport "rptHistoricalTime", acPreview, , "[NameOfFieldGoesHere]
    Between " & Me![cboStartWeek] & " And " & Me![cboEndWeek]

    --

    Ken Snell
    <MS ACCESS MVP>


    "Gina Whipp" <NotInterested@InViruses.com> wrote in message
    news:OFlX%23M0jGHA.2004@TK2MSFTNGP04.phx.gbl...
    > DoCmd.OpenReport "rptHistoricalTime", acPreview, , Between " &
    > Me![cboStartWeek] & " And " & Me![cboEndWeek] & ""
    >
    > I have tried to concate this thing ten ways from SUnday and can't get the
    > Between to work. The two fields are numeric. I have tried searching the
    > newsgroup and can't find anything to help me figure out what I am doing
    > wrong.
    >
    > Thanks in advance!
    > Gina Whipp
    >
     
  4. Rick Brandt

    Rick Brandt
    Expand Collapse
    Guest

    Gina Whipp wrote:
    > DoCmd.OpenReport "rptHistoricalTime", acPreview, , Between " &
    > Me![cboStartWeek] & " And " & Me![cboEndWeek] & ""
    >
    > I have tried to concate this thing ten ways from SUnday and can't get
    > the Between to work. The two fields are numeric. I have tried
    > searching the newsgroup and can't find anything to help me figure out
    > what I am doing wrong.
    >
    > Thanks in advance!
    > Gina Whipp


    The syntax for BETWEEN is...

    SomeValue Between ThisValue and ThatValue

    You only have two out of the three required operands. WHAT is it that should be
    between Me![cboStartWeek] And Me![cboEndWeek]? Assuming it is a field in the
    report and that all three operands are dates then it should look like...

    DoCmd.OpenReport "rptHistoricalTime", acPreview, , "SomeDateFieldName Between #"
    & Me![cboStartWeek] & "# And #" & Me![cboEndWeek] & "#"



    --
    Rick Brandt, Microsoft Access MVP
    Email (as appropriate) to...
    RBrandt at Hunter dot com
     
  5. Gina Whipp

    Gina Whipp
    Expand Collapse
    Guest

    You know... hitting myself in the head ...that's the same mistake I did the
    last time I tried to use Between. I keep forgetting that! Thanks Ken!

    "Ken Snell (MVP)" <kthsneisllis9@ncoomcastt.renaetl> wrote in message
    news:ulGoqT0jGHA.4972@TK2MSFTNGP05.phx.gbl...
    > You're missing a " character to left of Betwen, and you do not specify the
    > field that is to be filtered, and you don't need the trailing " character:
    >
    > DoCmd.OpenReport "rptHistoricalTime", acPreview, , "[NameOfFieldGoesHere]
    > Between " & Me![cboStartWeek] & " And " & Me![cboEndWeek]
    >
    > --
    >
    > Ken Snell
    > <MS ACCESS MVP>
    >
    >
    > "Gina Whipp" <NotInterested@InViruses.com> wrote in message
    > news:OFlX%23M0jGHA.2004@TK2MSFTNGP04.phx.gbl...
    >> DoCmd.OpenReport "rptHistoricalTime", acPreview, , Between " &
    >> Me![cboStartWeek] & " And " & Me![cboEndWeek] & ""
    >>
    >> I have tried to concate this thing ten ways from SUnday and can't get the
    >> Between to work. The two fields are numeric. I have tried searching the
    >> newsgroup and can't find anything to help me figure out what I am doing
    >> wrong.
    >>
    >> Thanks in advance!
    >> Gina Whipp
    >>

    >
    >
     
  6. Gina Whipp

    Gina Whipp
    Expand Collapse
    Guest

    Now I'm getting expected End of Statement highlighting the word Between

    "Ken Snell (MVP)" <kthsneisllis9@ncoomcastt.renaetl> wrote in message
    news:ulGoqT0jGHA.4972@TK2MSFTNGP05.phx.gbl...
    > You're missing a " character to left of Betwen, and you do not specify the
    > field that is to be filtered, and you don't need the trailing " character:
    >
    > DoCmd.OpenReport "rptHistoricalTime", acPreview, , "[NameOfFieldGoesHere]
    > Between " & Me![cboStartWeek] & " And " & Me![cboEndWeek]
    >
    > --
    >
    > Ken Snell
    > <MS ACCESS MVP>
    >
    >
    > "Gina Whipp" <NotInterested@InViruses.com> wrote in message
    > news:OFlX%23M0jGHA.2004@TK2MSFTNGP04.phx.gbl...
    >> DoCmd.OpenReport "rptHistoricalTime", acPreview, , Between " &
    >> Me![cboStartWeek] & " And " & Me![cboEndWeek] & ""
    >>
    >> I have tried to concate this thing ten ways from SUnday and can't get the
    >> Between to work. The two fields are numeric. I have tried searching the
    >> newsgroup and can't find anything to help me figure out what I am doing
    >> wrong.
    >>
    >> Thanks in advance!
    >> Gina Whipp
    >>

    >
    >
     
  7. Gina Whipp

    Gina Whipp
    Expand Collapse
    Guest

    I got it! Silly me, typo

    "Ken Snell (MVP)" <kthsneisllis9@ncoomcastt.renaetl> wrote in message
    news:ulGoqT0jGHA.4972@TK2MSFTNGP05.phx.gbl...
    > You're missing a " character to left of Betwen, and you do not specify the
    > field that is to be filtered, and you don't need the trailing " character:
    >
    > DoCmd.OpenReport "rptHistoricalTime", acPreview, , "[NameOfFieldGoesHere]
    > Between " & Me![cboStartWeek] & " And " & Me![cboEndWeek]
    >
    > --
    >
    > Ken Snell
    > <MS ACCESS MVP>
    >
    >
    > "Gina Whipp" <NotInterested@InViruses.com> wrote in message
    > news:OFlX%23M0jGHA.2004@TK2MSFTNGP04.phx.gbl...
    >> DoCmd.OpenReport "rptHistoricalTime", acPreview, , Between " &
    >> Me![cboStartWeek] & " And " & Me![cboEndWeek] & ""
    >>
    >> I have tried to concate this thing ten ways from SUnday and can't get the
    >> Between to work. The two fields are numeric. I have tried searching the
    >> newsgroup and can't find anything to help me figure out what I am doing
    >> wrong.
    >>
    >> Thanks in advance!
    >> Gina Whipp
    >>

    >
    >
     
  8. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Exactly what did you change your code to?

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Gina Whipp" <NotInterested@InViruses.com> wrote in message
    news:uxK6gc0jGHA.1936@TK2MSFTNGP04.phx.gbl...
    > Now I'm getting expected End of Statement highlighting the word Between
    >
    > "Ken Snell (MVP)" <kthsneisllis9@ncoomcastt.renaetl> wrote in message
    > news:ulGoqT0jGHA.4972@TK2MSFTNGP05.phx.gbl...
    >> You're missing a " character to left of Betwen, and you do not specify
    >> the field that is to be filtered, and you don't need the trailing "
    >> character:
    >>
    >> DoCmd.OpenReport "rptHistoricalTime", acPreview, , "[NameOfFieldGoesHere]
    >> Between " & Me![cboStartWeek] & " And " & Me![cboEndWeek]
    >>
    >> --
    >>
    >> Ken Snell
    >> <MS ACCESS MVP>
    >>
    >>
    >> "Gina Whipp" <NotInterested@InViruses.com> wrote in message
    >> news:OFlX%23M0jGHA.2004@TK2MSFTNGP04.phx.gbl...
    >>> DoCmd.OpenReport "rptHistoricalTime", acPreview, , Between " &
    >>> Me![cboStartWeek] & " And " & Me![cboEndWeek] & ""
    >>>
    >>> I have tried to concate this thing ten ways from SUnday and can't get
    >>> the Between to work. The two fields are numeric. I have tried
    >>> searching the newsgroup and can't find anything to help me figure out
    >>> what I am doing wrong.
    >>>
    >>> Thanks in advance!
    >>> Gina Whipp
    >>>

    >>
    >>

    >
    >
     
  9. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Exactly what did you change your code to?

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Gina Whipp" <NotInterested@InViruses.com> wrote in message
    news:uxK6gc0jGHA.1936@TK2MSFTNGP04.phx.gbl...
    > Now I'm getting expected End of Statement highlighting the word Between
    >
    > "Ken Snell (MVP)" <kthsneisllis9@ncoomcastt.renaetl> wrote in message
    > news:ulGoqT0jGHA.4972@TK2MSFTNGP05.phx.gbl...
    >> You're missing a " character to left of Betwen, and you do not specify
    >> the field that is to be filtered, and you don't need the trailing "
    >> character:
    >>
    >> DoCmd.OpenReport "rptHistoricalTime", acPreview, , "[NameOfFieldGoesHere]
    >> Between " & Me![cboStartWeek] & " And " & Me![cboEndWeek]
    >>
    >> --
    >>
    >> Ken Snell
    >> <MS ACCESS MVP>
    >>
    >>
    >> "Gina Whipp" <NotInterested@InViruses.com> wrote in message
    >> news:OFlX%23M0jGHA.2004@TK2MSFTNGP04.phx.gbl...
    >>> DoCmd.OpenReport "rptHistoricalTime", acPreview, , Between " &
    >>> Me![cboStartWeek] & " And " & Me![cboEndWeek] & ""
    >>>
    >>> I have tried to concate this thing ten ways from SUnday and can't get
    >>> the Between to work. The two fields are numeric. I have tried
    >>> searching the newsgroup and can't find anything to help me figure out
    >>> what I am doing wrong.
    >>>
    >>> Thanks in advance!
    >>> Gina Whipp
    >>>

    >>
    >>

    >
    >
     

Share This Page