Results 1 to 6 of 6
  1. #1
    Join Date
    May 2003
    Posts
    14

    Unanswered: Cumulative Check Number

    Hey,
    I have a table with multiple records, each containing a unique payroll company with a beginning check number. How do I apply this check number to another table, the check registry table, and have the check number increment for each check to be issued???? By the time I'ts ready to increment, the user knows the payroll company and has selected it, along with the starting check number. The checks are now ready to be created/printed starting with the beginning number and incremented by one for however many checks are to be printed. I need to increment that check number by one until all of the checks in the table have been issued/printed. The quantity of checks to issue/print varies. I HOPE THIS MAKE SENSE.



    I appreciate any help.

    Thanks.
    Last edited by calprof; 05-29-03 at 11:23.

  2. #2
    Join Date
    Jan 2003
    Location
    Vietnam
    Posts
    188

    Re: Cumulative Check Number

    Originally posted by calprof
    Hey,
    I have a table with multiple records, each containing a unique payroll company with a starting check number. How do I apply this check number to another table, the check registry table, and have the check number increment for each check to be issued????

    I appreciate any help.

    Thanks.
    my suggestion is whenever a new check is issued (you should know the company ID, shouldnt you?), filter the check registry table for the maximum existing check number of that company and plus 1. this will be the new check number increased by 1.
    qha_vn

  3. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    you can use a DMax function filtering by the Company - Provided those check numbers really have a data type of Number(integer)

    Sometimes Number data is really text and the sort is done by an alpha sort rather than a true numeric increment.

  4. #4
    Join Date
    May 2003
    Posts
    14

    Re: Cumulative Check Number

    Originally posted by qha_vn
    my suggestion is whenever a new check is issued (you should know the company ID, shouldnt you?), filter the check registry table for the maximum existing check number of that company and plus 1. this will be the new check number increased by 1.

    Thanks for the suggestion, but I've already tried to take the starting number and just add 1 and all it does it take the original number and adds one, so if there are 10 checks each check winds up with the same number. In "C" or "Pascal" all you would do is checknumber = checknumber + 1. Basically that's all I want to be able to do.

    I've updated the original help message with more info.

    Thanks again

  5. #5
    Join Date
    May 2003
    Posts
    14
    Originally posted by axsprog
    you can use a DMax function filtering by the Company - Provided those check numbers really have a data type of Number(integer)

    Sometimes Number data is really text and the sort is done by an alpha sort rather than a true numeric increment.

    Thanks for the suggestion. However, DMax won't work for this. If I was programming this in "C" or "Pascal" it would be checknumber = checknumber + 1. That's all I'm really trying to do. I've updated the original help message with more info.

    Thanks again.

  6. #6
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    Dim x As Integer
    x = DMax("[myfield]", "mytable", "[mycompany] = 'abc'")
    x = x + 1

    I tested it - it works

Posting Permissions

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