JeffreyDavid
Registered User.
- Local time
- Today, 19:07
- Joined
- Dec 23, 2003
- Messages
- 63

I have a form (ProposedProject) with a subform and each time I open the form, it checks the Orders table, finds the last project number and adds 1 and that is my new project number. Heres the code I used.
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Orders", dbOpenDynaset)
rs.MoveLast
Me!txtProjectNo = rs("ProjectNo") + 1
Forms![NewProject]![Project subform]![ProjectNo] = rs("ProjectNo") + 1
I also have a different form (ExistingProject) so I can enter existing projects and that form lets me manually enter the project number.
After I enter an ExistingProject, which I manually enter the project number, I open the ProposedProject form, which is suposed to find the last project number and add 1, the number is one I have already used and not consistent.
How can I reset the numbers it pulls or tell it to go to the last record and add 1 again?