Results 1 to 4 of 4

Thread: Counter

  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post
    I want to update my counter (using the caption of a label) on a form when I get to an evan hundred records. I am incrementing a counter for each record processed.

    I've done this before but can't remember the function or where I used it.

    Can someone prod my memory please. ..

  2. #2
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='kentg' post='791338' date='30-Aug-2009 16:44']I want to update my counter (using the caption of a label) on a form when I get to an evan hundred records. I am incrementing a counter for each record processed.

    I've done this before but can't remember the function or where I used it.

    Can someone prod my memory please. ..[/quote]

    I've tried -
    If mod intCounter 100 then
    me.lblCounter.caption = "Record " & intcount
    end if

    But it still updates for each loop, not once for every hundred.

    Can anyone see the problem with this line?

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Change the line

    If mod intCounter 100 then

    to

    If intCounter Mod 100 = 0 Then

  4. #4
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='HansV' post='791343' date='30-Aug-2009 18:48']Change the line

    If mod intCounter 100 then

    to

    If intCounter Mod 100 = 0 Then[/quote]
    That's better, Thanks Hans

Posting Permissions

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