Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error while opening table in code (2000)

    In the attached mdb, if you select "Italia" in the List10 combo box and 2003 and 2004 in the combo boxes labeled "begin" and "end" respectively and click on the button labeled "Execute", Private Sub Comando0_Click() runs without problems, but I can't make out why, if I select 2002 in the combo box labeled "begin", I get the error message:
    "Not included in the current interval."
    The code launched by the button labeled "Execute" stops right after opening the "PerReport" table but the table does contain data for the year 2002 so I don't understand why that error message pops up.

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

    Re: Error while opening table in code (2000)

    In this portion of code :
    Else
    rst!Potenza = rst!SommaDiEnergia / 8760
    rst!orefeb = 672
    rst!Giornifeb = 28
    rst.Update
    End If
    rst.MoveNext

    For 2003 to 2004 you put 24403 in rst!Potenza.
    For 2002 to 2003 you try to put 33645 in rst!Potenza and that's to big for an integer.
    Is that the problem ?
    Francois

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error while opening table in code (2000)

    Yes!!!
    Thank you Francois!!! <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

Posting Permissions

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