numbering rows in a table

D

dennis

i have a table with 100 odd names and the members id list is the primary key
with auto number
i then select names from this list and create a second table again it has
the members list primary key and auto number
what i want to do is to manually number the records in the second table,not
using the auto number system so that i can total the number of records
selected.
how do i do this
thanks dennis
 
J

John... Visio MVP

dennis said:
thanks but i still cannot number the rows in my table
rgds dennis


I guess I should have asked you the key question, why would you want to
renumber the records? If it is just to get a count of the number of records
selected, there are other ways to do that.


( Steve is notorious for making his presence known by giving half answers
and trying to intimidate users into thinking that this stuff is hard and
they should pay for his service. )

John...
 
D

dennis

ok you have confused me now
john all i want to know is how to get a count of the number of records
selected
can we leave steve out of this discussion
 
B

BruceM

In an unbound text box on the form, set the control source to:
=Recordset.Recordcount

Or just use the built-in navigation buttons, which include a record count.

If you want to select several names, then get a count of the number of names
selected, you could adapt the code here:
http://allenbrowne.com/ser-50.html

It is for filtering a report, but could be used for a form.

Steve's suggestion may be another approach you could take.

One thing you should not do is copy the names to another table. That would
be redundant data storage, which is to be avoided when possible (and it is
certainly possible in this case) in a relational database.
 
J

John Spencer

You can count the number of records in a table with the DCount function

DCount("*","YourTableName") will return the a count of the records in the table.

Beyond that suggestion, I cannot help you. Unless you want to post more
details about how you are doing the transfer from table1 to table2

If you want a count of the number of records selected in the source table then
you can use DCount with the third argument. Again, since I don't know how you
mark the selected record (or even if you do mark the record), I can't suggest
a specific solution.


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
D

dennis

thanks bruceM
my table 1 has some 118 names and i use an add-in drag-n-drop function to
select names to put into table 2 this works fine
now i want to show the total No of records in each table after processing.
once completed table 2 can be emptied ready for the next selection process
i hope this makes sense i am new to access so appreciate step by step
instructions
rgds dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top