I need to place a field on a report that contains a number which automatically increases by 1 upon each printing. To give more details, I am working on a database which prints work orders, each one must have a unique #. The # cannot be the same for each customer, or I would simply place the AutoNumberID field on the work order, this won’t work since each one has to be different. This # does not need to be kept in a table, so unbound would probably work, but I can’t seem to figure how to code it. Any help would be much appreciated.
Thanks,
Michael
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Need incrementing field on report (Access 2000)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Need incrementing field on report (Access 2000)
- This topic has 7 replies, 3 voices, and was last updated 23 years, 6 months ago.
AuthorTopicWSMHadden
AskWoody LoungerNovember 18, 2001 at 4:03 am #363026Viewing 0 reply threadsAuthorReplies-
WSJayden
AskWoody LoungerNovember 18, 2001 at 5:02 am #552766I’m not certain if I understand exactly what it is that you are trying to do? I assume that you just want a number on a report to be incremented by 1 each time you run or print the report?
You say that you do not need to keep the number is a table? I’m not sure what you mean by this, as the easiest way to remember what number you are up to each time is to store the number is a table.
I would use the Reports Open event to access a table and determine the next report value from that table and set a variable to hold the value. Then from the control on the report that I would want to display this number, I would reference a function which returns the current value of the variable.
Does this make any sense?
-
WSJayden
AskWoody Lounger -
WSMHadden
AskWoody LoungerNovember 18, 2001 at 1:34 pm #552791What you’re saying makes a lot of sense, it’s just that I ‘m not sure how to make this happen. I have worked with vba for about three years, but I still have a lot to learn. Would you have time, or be willing to go into more detail on how to accomplish my goal.
The reason I said I don’t need to keep this in a table is simply that I can’t store this value in the same table as the customer information, because it would require many workorders per customer. If it would be best to create a table to store this #, that would be fine, except that 1.) I don’t exactly understand how to accomplish this and 2.) It is not needed after being printed (although I can see benefits to this).
Thank you so much for your help, and thanks in advance for any future help or advice,
– Michael -
WSGARYPSWANSON
AskWoody LoungerNovember 19, 2001 at 3:04 am #552828… Can I try a different angle. It appears that you have created a table to hold Customers where each customer can have only one unique ID. Each customer can also have multiple work orders. Could you clarify what makes the work order ID unique? Is every work order ID unique or is the Customer and Work Order combination unique such that you could re-use the same work order number for different customers.
You can number the work orders various ways. One way would be to set up a master Customer table holding the Customer Name, Unique Identifier, and other information as necessary. Set the Unique ID and Customer Name as the primary key. Create another table that holds work order information. This is where you need to define what makes the work order ID unique. Is every work order ID unique or is the Customer Unique ID and Work Order ID unique. (I am assuming that every work order ID is unique.)
The work order table will hold work order information including the Customer Unique ID. Link the Customer Unique ID and Customer Name (Primary Key) in the primary table as a one to many link to the Customer Unique ID, Customer Name, and Work Order unique ID in the Work Order table. You could then set the work order table to create a new ID every time a work order is created thus creating unique work orders that are linked to the Customer.
Good Luck.
-
WSMHadden
AskWoody LoungerNovember 19, 2001 at 4:18 am #552832Thanks for the response. As far as what makes the work order # unique, it’s fairly straightforward. Each work order has a different number that is printed on it. The easiest way to do this would have been to have the printer put the numbers on the work orders when they were printed, unfortunately though, I don’t have the ability to have this done. I really just need to have the work orders printed as follows:
Customer Name // Work Order #
Jim Smith // 000001
Sally Jones // 000002
Frank Sanders //000003
Jim Smith // 000004Each Work Order would have a different #, even if you printed 2 or more for the same customer (note Jim Smith example above) they would each have a different number.
Again, Thanks for your suggestions and feel free to give any further input you may have based on my response.
Thanks, Michael -
WSJayden
AskWoody LoungerNovember 19, 2001 at 5:53 am #552834I think what it looks like you need is actually a ‘work-order’ table, with the work-order number an auto-number field. The work-order table would be in a one-to-many relationship with the customers table, with the customer table being the one side of the relationship.
The work-order table would contain the customer number, the work order number and any details you wish to record about that particular work order itself.
I think that you are perhaps going about it the wrong way wanting to print a new number each time a work order is printed…what happens if you want to reprint a work order, it would be given a different number, which is not true as it would just be a reprint.
-
WSGARYPSWANSON
AskWoody LoungerNovember 19, 2001 at 4:37 pm #552943I agree with Jayden’s response and am also confused as to why you would create a new number each time a work order is printed.
You could auto increment the work order id in a work order table and use a report to print the work orders, thus giving you the ability to generate the unique work order numbers as needed and also print out the work orders without changing the work order unqiue id.
-
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Mozilla Firefox Security Updates! Released late 17th May 2025
by
Alex5723
1 hour, 30 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
5 hours, 20 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
5 hours, 29 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
4 hours, 16 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
15 hours, 18 minutes ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
5 hours, 43 minutes ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
17 hours, 58 minutes ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
10 hours, 14 minutes ago -
Some advice for managing my wireless internet gateway
by
LHiggins
5 hours, 55 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
12 hours, 11 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
1 day, 3 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
23 hours, 45 minutes ago -
Does windows update component store “self heal”?
by
Mike Cross
13 hours, 48 minutes ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
1 day, 17 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
1 hour, 22 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
5 hours, 3 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
1 day, 20 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
1 day, 20 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
1 day, 8 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
2 days, 4 hours ago -
0Patch, where to begin
by
cassel23
1 day, 22 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
2 days, 17 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
2 days, 5 hours ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
3 days, 2 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
2 days, 17 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
2 days, 4 hours ago -
Installer program can’t read my registry
by
Peobody
1 hour, 35 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
2 days, 15 hours ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
2 days, 22 hours ago -
False error message from eMClient
by
WSSebastian42
3 days, 13 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.