Overspill records help!

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

    Overspill records help!

    Hi,
    I'm having issues with a setup I'm using to hold data on certain lease numbers within a region. As it is, I have a set amount of information I want on one single record, and all overspill is recorded on the next record, and so forth, until all the info I have is accounted for.

    What I want to do is have a quick reference on every record, aside from the normal page numbering system, which just counts how many records I have. I want to know how many different lease numbers I have, and I have created a note at the bottom of lease number and last name. For example I want to create:

    LeaseNumber LeaseName
    |
    |
    -Info-
    |
    |
    Page#(of total printed on paper), Page#(of identical records)

    so I might end up with
    455633 Katz
    |
    |
    55 of 180, 1 of 4

    I can return the number of identical LeaseNumber fields by using Count and Dlookup, but denoting first second third pages is tricky.

    Currently, I'm using an AfterUpdate event where, when the LeaseNumber is entered, it adds 1 to the PageCount field, where its default value is 0. However, if for some reason somebody changes or simply re-enters the LeaseNumber value, PageCount is no longer correct. What can I do to idiot-proof this?
  • Tanis
    New Member
    • Mar 2006
    • 143

    #2
    There's a property on the text box called 'Locked' Set this to yes. Just a question though, is this on a form or report. And if a form, why?

    Comment

    • KelHemp
      New Member
      • Oct 2006
      • 16

      #3
      Originally posted by Tanis
      There's a property on the text box called 'Locked' Set this to yes. Just a question though, is this on a form or report. And if a form, why?
      it's on a report and an identical form. The form is the one that's mostly screwy thanks to people updating the records. Why I feel I need it there (in the form) is because only half of the page numbering within is done automatically, the rest is after an update within the LeaseNumber field on the form. I can't set it to onCurrent, because it keeps adding to the page number every time I go back and look at the record if I do that.

      Setting the Locked property of PageCount and LeaseNumber does keep someone from going in and editing after it's been entered, but is there a way to lock them as an AfterUpdate event?

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        Code:
         
        Public Sub ControlName_AfterUpdate()
         
        Me.ControlName.Locked = "Yes"
         
        End If

        Comment

        • KelHemp
          New Member
          • Oct 2006
          • 16

          #5
          Thank you! works great. It's not perfect, but it'll keep those little mistakes from ruining things. Now I have to work on keeping out those of us who think we know what we're doing!

          Comment

          Working...