Numbering Records

  • Thread starter Thread starter BlackICE
  • Start date Start date
B

BlackICE

Guest
Hi I obviously have a table with records in it sorted in assending order. What I need is to know how to make it add into one of the table fields the number it is in the table. IE

Name Time Position Number
Mr Jones - 12:30 - 1
Mr Evans - 12:45 - 2

So if i added 12:35 it would change mr evans position number to 3 and make the new record position number 2.
 
Have you ever manipulated recordsets with DAO or ADO? That's the only way I can think of to do it...
 
Nope how would i go about doing that? I've used DAO 3.6 when using VB as a front end however im trying to help a friend on his access database, for his course where he is only allowed to use access, Ive never really used access for anything other than a backend.
 
It's really more than one could cover in a forum thread like this. It's basically all done in code. Something like

Do some code to assign a set of record to a variable, then you can move back and forth among the records and manipulate the data (among other things, such as adding and deleting records).

Go into a module and look up movefirst in VBA help. That should get you started. You can also do a search here in the forum for help...
 
Number

Don't know how to do it, but if it's for display purposes only I'm sure you don't need to do it.

Use a query and sort the records on the Time Field and then use a Running Sum
to display the records on a Form or a Report.
May save you a lot of work (and trouble)
 
Last edited:
TruckTime is right. You shouldn't store the #s in your table. It is not worth
the effort to try and keep them up-to-date. May lead to some hard to find
bugs (and missed appointments).

You can use the running sum approach on a form/report. It's even possible
to number them in a query.

Wayne
 

Users who are viewing this thread

Back
Top Bottom