K
Kim Webb
Last January this group helped me come up with an event procedure that
automatically assigns project numbers in my form.
I use this in the BEFOREUPDATE event procedure:
So project number look like this 06xxx.
We are now at project 06999 so I need the next one to be 061001 and thn
061002, 061003 etc
I took the above and changed it to:
I thin went in to the table and made the next project 061000. When I
go in to the form and enter the data I get this error:
the object does not contain the automation object "projects"
Many thanks for any assistance
automatically assigns project numbers in my form.
I use this in the BEFOREUPDATE event procedure:
Dim strYear As String
strYear = Format(Date, "yy")
Me.ProjectID = strYear & _
Format(Nz(DMax("Val(Right(ProjectID,3))", _
"Projects", "Left(ProjectID,2)='" & strYear & _
"'"), 0) +1, "000")
So project number look like this 06xxx.
We are now at project 06999 so I need the next one to be 061001 and thn
061002, 061003 etc
I took the above and changed it to:
Dim strYear As String
strYear = Format(Date, "yy")
Me.ProjectID = strYear & _
Format(Nz(DMax("Val(Right(ProjectID,4))", _ {changes 3 to 4}
"Projects", "Left(ProjectID,2)='" & strYear & _
"'"), 0) +1, "0000") {changed 000 to 0000}
I thin went in to the table and made the next project 061000. When I
go in to the form and enter the data I get this error:
the object does not contain the automation object "projects"
Many thanks for any assistance