Receipt Numbering in Append Query

T

Tal

Hi all,

I have read a lot of posts that touch on this subject, but I haven't yet
found one that meets my needs that I can understand, so please bear with me.

I work for a charity.
We receive donations and issue tax receipts.
One donor may make multiple donations in a given time period.
Receipts are generated using a series of stacked sum queries and ends with
an append query to the Receipt table.
Right now I use the Autonumber to assign the Receipt number, which must, by
law, be sequential. I understand that this is a bit dangerous.
What do I need to do to automatically sequentially number the receipts via
the append query.

Thank you for your help and I am sorry if this has been answered before.
 
G

Golfinray

Autonumbers are not designed to be sequential. For example, if you delete
records, it also deletes those autonumbers, and there goes the sequence. Use
a record numbering system, which I know would be a pain to add to your
database. Something like adding a field (column) to your tables.
alter table yourtablename
add column Counter (10000,100000)
That would give you 90,000 numbers in the new column.
Or you can probably search for and find a much better one on here as I have
seen them before.
 
T

Tal

Hi Golfinray,

Thanks for the response. I get how that would work after the fact, but how
does that work on an ongoing basis?

Thanks,
Tal
 
G

Golfinray

You would either enter a new record number with each new entry or you would
have to automatically increment the record number each time a record is
added. That is what most people do. Try this:
SELECT (DCOUNT("ID", "yourtable", "ID <= " & T.ID) as SeqNum, ID,
otherstuff
FROM yourTable T
 
T

Tal

I am going to give it a try. Thanks Golfinray. Everything else I read seemed
overly complicated.
 

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