Add records to a recordset

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmar93
    New Member
    • Mar 2008
    • 46

    #16
    Change made no difference.

    Comment

    • dsatino
      Contributor
      • May 2010
      • 393

      #17
      Could have. You can't add a number to a Null. Before the change, you weren't moving any data to rsDest.Fields(" TotalSF") so it would be null. Now, there should be data in the TotalSF field of your schedule table, but if there is an empty value in one of the records, you'll get the same error.

      There are lots of ways to deal with that via code, but you're probably better off setting the default value in the table to 0 so you don't have to worry about it.

      Comment

      • jmar93
        New Member
        • Mar 2008
        • 46

        #18
        There was a null value in the source table, once I removed it everything works great. Thank you so much for all of your help, it was huge.

        thanks again,
        Jeff

        Comment

        • jmar93
          New Member
          • Mar 2008
          • 46

          #19
          Hi,

          One last question, what is the easiest way to replace the 10000 in the following line:

          Do Until x > 10000

          with a number that you enter at run-time?

          thanks,
          Jeff

          Comment

          • jmar93
            New Member
            • Mar 2008
            • 46

            #20
            Forget it, figured it out.

            thanks,
            Jeff

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32636

              #21
              Jeff,

              Please note all the times people have had to tidy up after you adding the code tags that are required when posting code. Please ensure this never happens again, or we will issue an official site warning which could lead to a suspension of your account on further transgressions.

              -Administrator.

              Comment

              Working...