I generally work on a agregated query that searches for the last
record.
Here is an example of a query I run, which I then do a +1 to to
enumerate the next Invoice number for a particular site.
e.g.
SELECT Count(tbl_data_InvoiceMatrix.InvoiceNumber) AS
LastInvoiceNumber
FROM tbl_data_sites INNER JOIN tbl_data_InvoiceMatrix ON
tbl_data_sites.SiteName = tbl_data_InvoiceMatrix.InvoiceSite
GROUP BY tbl_data_sites.SiteName
HAVING (((tbl_data_sites.SiteName)=fncCurrentSite()));
Let me know if there is anything else I can do to help, or if this
doesn't work for you.
Regards
Anthony Moore
IT Excellence
I'm a little nervous about using Count +1 in the event that a record
(that is not the last record) has been deleted and then shortly after
a new record created, recreating the most recent id# and end up with
duplicates in the system. Do you think there is another way it could
be done - like using the highest value of the field and then +1 on
that? Please forgive me for being unschooled.
magmike
PS - know of a good beginners resource for coding?