How do I count rows in a table and then append the table starting with the next row number

Question:

I have an update query that counts the number of rows in table a, then fills in the row number in table a.

However, I would like my query to count the numbers in table b, then starting with the next number in table b, update table a with sequencial numbered rows.

table b (existing)
row1
row2
row3

table a (being created)
row4
row5
row6

Here is what I have that works when working with one table

DCount(“rowid”,”table a”,”rowid <= ” & [table a]![rowid])

The tables will eventually be combined into one table, that is why I need sequencial rowids. The program I am using has this field as key and needs to be filled in before I can combine the tables.

TIA

Solution:

Researched different aternatives. Apply your original construct DCount(“rowid”,”qryCustOrderLineNo”,”rowid <= ” & [qryCustOrderLineNo]![rowid]) with qryCustOrderLineNo. If this does not work we need to have some key columns in table-b and update individual queries row by row after counting the total rows from table-a. Keep the total rows in a variable and update table b after incrementing the total row by 1 and keep doing this till we completed all records in table-b.

Tags: ·
digg delicious stumbleupon technorati Google live facebook Sphinn Mixx newsvine reddit yahoomyweb
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...