2007 to 2003 code problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eugenio
    New Member
    • Mar 2008
    • 13

    2007 to 2003 code problem

    Hello everyone. I've been working on a database in MSAccess2007 and had to convert it to 2003. I have a line of code which returns a requested date range from a query to a listbox:

    Code:
    Dim MySQL As String
    MySQL = "SELECT * FROM qryContLife  WHERE 1=1"
    
    If IsDate(Me![StartDate]) And IsDate(Me![EndDate]) Then
       If CDate(Me![StartDate]) < CDate(Me![EndDate]) Then
          mycriteria = mycriteria _
            & " AND [Depot In Date] Between #" _
            & Format(Me![StartDate], "yyyy/mm/dd") _
            & "# And #" _
            & Format(Me![EndDate], "yyyy/mm/dd") & "# "
       End If
    End If
    
    MyRecordSource = MySQL & mycriteria
    Me![lstContList].RowSource = MyRecordSource
    After converting, it stopped working. Returns nothing. Any idea how to solve this?
  • janders468
    Recognized Expert New Member
    • Mar 2008
    • 112

    #2
    Could you post the full function ? I.e. the function signature as well.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32663

      #3
      I'm afraid the description "just stopped working" is not very helpful.

      Can you not explain what happens differently from what is expected - and where?

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        You say it "returns nothing," does it throw any errors? And after converting to v2003, when you have trouble running it, are you running it under v2007 or under a copy of v2003?

        Welcome to Bytes!

        Linq ;0)>

        Comment

        • Eugenio
          New Member
          • Mar 2008
          • 13

          #5
          sorry for not posting, was quite busy. Right, the problem is solved through chaning the date separator in the regional settings ;) format was dd.mm.yyyy , after changing it to dd/mm/yyyy, everythings fine.

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            So it wasn't really a 2007 to 2003 problem then?

            Linq ;0)>

            Comment

            Working...