Serial number for reports

How can i get serial numbers on each report in MS Access
vijju284Asked:
Who is Participating?
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
You really should "generate" bills via a Form, then build a report that will allow you a printed version of your invoice.

Again: By "serial numbers", do you simply mean a unique "bill number"? A Serial Number is typically something that is assigned to a physical item (like a motor, or a computer monitor), and would have some form of meaning to that item (i.e. a SN would probably tell you the date/time the item was created, the factory location, etc etc). An "invoice number", on the other hand, normally just needs to be sequential.

Is this to be a multiuser system? If so, your needs can change drastically. A single user system can simply use DMax to get the next available invoice number, but with a multi user system you must be concerned with users duplicating numbers. I would presume that your process would be:

Generate Invoice
Generate Invoice Number
Store data to database
Print Invoice

IOW - your Report should not really have anything to do with the actual data manipulation, but should instead simply reflect the data that is stored in the database.
0
 
coffeeshopCommented:
Insert a unbound field to your report "txtSerNr" an set the ControlSource to

=1

Change the property "RunningSum" of this field to "All" or "Group", depending for what you need the sum.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Can you explain further what you mean by "serial numbers"? Is this data that would be stored in your database, or are you just wanting to add numbers (as coffeeshop suggests) to your reports?
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
or are you saying that you want to number each running of a report so that it can be identified?
JimD.
0
 
vijju284Author Commented:
it should be stored in database
0
 
Jeffrey CoachmanMIS LiasonCommented:
vijju284,

Again, you are not being very specific here.
Can you clearly explaion what you are trying to accomplish here, in a bit more than one short sentence, please?
This way you are not forcing us to guess.

This saves both you and us valuable time.

JeffCoachman
0
 
vijju284Author Commented:
I am trying to generate bills from MS Access reports by using perameter querries.   If I save the bill by using command button it should store in a table and it should generate serial number for each report automatically.
0
 
coffeeshopCommented:
Do you need consecutive numbers or should they include something special?

Please post your query so that we can take a look which approach is better. You can do it with a join in your query, if you have a unique key in your table(s), or you can create it with a custom function.
0
 
vijju284Author Commented:
consecutive numbers only
0
 
coffeeshopCommented:
If you have a unique key, here an example without grouping:

SELECT A.*, (SELECT COUNT(*) FROM tblYourTable AS B WHERE B.YourKeyField<=A.YourKeyField) AS SerNr
FROM tblYourTable AS A;
0
 
vijju284Author Commented:
where should i give the statement
0
 
Patrick MatthewsCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.