Add New record based on last project number

A

AJ

I have a form (frmcurrentassignments) based on a query
(qrycurrentassignments). The query filters out the projects that don’t have a
completion date.
On the form there is a control (ar_num) which is the assignment number. It
is formatted by the year.0001 etc. (2008.0036). I need to be able to click on
a button (new record) and it find the last number used (2008.0036), add
0000.0001 to it, and put the new number (2008.0037) in a new blank record.
Unfortunately, the last number is not always in the query because it has been
completed. Any suggestions?

I have tried to use the gotorecord and have it pull the last record from the
table but it just gives me an objectname argument not found.

I have also tried the gotorecord without specifying the table/query etc. and
it pulls the last record in the query, adds to it but cannot create the new
record because it would be a duplicate.

Thanks in advance - AJ
 
K

Klatuu

There are a couple of unknowns here.
The name of the table where the number is stored
The name and data type of the field
How you determine which year to use.
It is better to use two fields to do this, but it can be done with one.
 

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