Results 1 to 4 of 4
  1. #1
    puzzlednewbie is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2012
    Posts
    2

    Exclamation autonumbering.

    Hi everybody, right, here goes. i have created an address book/job sheet creator. When i enter a new entry into my address book (form View)i have an address id automatically assigned to it from the field "addressID" in my table. Not a problem.
    But i may go back to an entry in my address book and print of a report (job Sheet). I want my report to have a unique number, not the address id but a "Job Number". Is it possible to have a number printed on the "Job Sheet" say 0001 then the next time i print a "Job Sheet" the number is 0002 and so on, regardless of the "addressid" which is not on my report anyway.
    i have tried adding an autonumber to my table but i get a message to say i can have one autonumber in my table only. i cant put the autonumber in a new table as the report will only read fields from the table it was built from. In a nutshell, when i press print, the report has a number on it, the next time i print it has the next in the sequence. Thanks in advance.


    P.S i have no programming skills and i rely on the wizards mostly.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Options:

    1. Have a JobNumber table. Each time a report is printed, increment from the last value and save to table.

    2. Have a label with a caption that is just a number. Increment this number and save the report with this design edit. This is very tricky.

    3. Use date/time stamp as unique identifier. This is the easiest. You can even display the date/time as a number instead of date. http://www.access-programmers.co.uk/...d.php?t=216046

    Regardless of option, will have to modify the report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    puzzlednewbie is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2012
    Posts
    2
    Number 1 seems the best option for me, but how. lol
    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    This would probably involve VBA code to retrieve the maximum JobID, increment by one, save the new value to table, set a textbox to that JobID, report refers to textbox to use that value on the report. What if the first printout is ruined and must be reprinted? Do you want a new JobID?

    Several ways to accomplish, just have to get creative. One way might be to have form bound to JobID table. Have 'print' button(s) on form. When clicked, code performs the above steps to save new JobID record via the form's recordset.

    Attempt code and when you have specific issue, post question.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-21-2010, 01:19 AM
  2. Autonumbering when a checkbox is clicked?
    By kutehart in forum Forms
    Replies: 1
    Last Post: 08-02-2010, 09:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums