Manual Page numbering??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KelHemp
    New Member
    • Oct 2006
    • 16

    Manual Page numbering??

    So, I've set up a manual page numbering system, bound to the field "LeaseNumbe r" AfterUpdate, to keep track of how many records I have of each single lease number. It works, but if you go back and update the record extraneous amounts of times, the numbers get off.

    Here's what I have:

    Two controls to find values of previous and next LeaseNumber and another to keep track of previous PageNumber

    The PageNumber itself is stored as two digits, formatted @" of "@ so that 11 reads 1 of 1 and so forth,

    And the AfterUpdate code is:
    [code]Option Compare Database
    Public Sub Lease_Number_Af terUpdate()

    If Me!LeaseNumber = Me!PrevLeaseNum ber Then
    Me!PageNumber = PrevPageNumber +11

    End If

    If Me!LeaseNumber = NextLeaseNumber Then
    Me!PageNumber = Me!PageNumber + 1

    End If
    End Sub

    I'd like to make it a bit more "dummy-proof", so that just in case someone enters the same number in the LeaseNumber more than once, it doesn't create yet another page number out of thin air. Also, it's kind of a pain to have them as separate functions, since that means I have to go back to the previous record after I create record 2 of 2, in order to make it read 1 of 2.
    Thoughts?
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    Hi,

    Is really needed to do it manually?

    :)

    Comment

    Working...