Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2005

Tip: Looking for answers? Try searching our database.

Adding Line numbers to records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kbrad - 19 Jul 2005 15:35 GMT
I think I may be missing something obvious here but anyway.. (I may also have
posted in the wrong place!)

I have a table of Order Details which are added via a form. Currently when
they are added an autonumber ID field is used to identify them.
How can I get this number to start from 1 for the first detail under an
order and increment as each is added using the input form. So for every order
I have details 1 to however many order lines there are.
The reason I need to do this is so that when the order is printed the
details print with a sensible line number next to them. Should I be trying to
generate the number in the report - is that simpler. (The line number isn't
required other than for the report).
Allen Browne - 19 Jul 2005 15:45 GMT
There's a dead simple way to get this counter going on the report.

Just open your report in design view, add a text box to the Detail section
of your report, and give it these properties:
   Control Source    =1
   Running Sum       Over Group
   Format                 General Number

Each record the value is 1.
The running sum increments it each time, so it counts.
The format lets Access know to treat the calculated control as a number.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I think I may be missing something obvious here but anyway.. (I may also
>have
[quoted text clipped - 12 lines]
> isn't
> required other than for the report).
kbrad - 19 Jul 2005 16:37 GMT
Many thanks.

> There's a dead simple way to get this counter going on the report.
>
[quoted text clipped - 24 lines]
> > isn't
> > required other than for the report).
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.