By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,871 Members | 2,444 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,871 IT Pros & Developers. It's quick & easy.

Manual Page numbering??

P: 16
So, I've set up a manual page numbering system, bound to the field "LeaseNumber" 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_AfterUpdate()

If Me!LeaseNumber = Me!PrevLeaseNumber 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.
Oct 20 '06 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,418

Is really needed to do it manually?

Oct 27 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.