AutoNumber question

  • Thread starter Eric @ CMN, Evansville
  • Start date
E

Eric @ CMN, Evansville

I am designing a form in Access that will be used for data entry from a
manual time sheet. The current time sheet has 25 lines per page, and most
times, a single pay period for an individual is two pages as they track all
their activity to the customer install detail level. I would like to track in
the database the page number and line number from the time sheet so if we
have issues we can reference back to the original documnent quickly and
easily. I am thinking that the data entry person can key in the page # in a
form header (along with the person's ID and week beginning date) and I would
like the line number field to autopopulate, but reset back to a value of "1"
when the data entry person keys in a different page number for a given
individual. I'm not sure how to do that....I assume the field type of
autonumber can't do that, but what can I do to accomplish my desired results ?

Any thoughts ?

Thanks !
 
P

Phillip Windell

The source Data Table needs to have the two fields for Page Number and Line
Number to hold the values. The form would display those values like any
other field value. Autonumber would have nothing to do with this.

Evansville,..Illinois, Ind? Just curious.
 
J

Jackie L

Eric,
I threw together a quick example database since I felt it would be too
confusing to describe in this forum. I would be happy to send you the file
if you would be willing to give me your address.

Jackie
 
K

KARL DEWEY

No, autonumber will not do what you need here. Autonumbers are generated
uniquely but not necessarily in sequence.
To use autonumbers you would need to have a separate table for every
timesheet for every person as the numbers can not be duplicated.
What you are looking for is a unique combination of EmployeeID, WorkWeek,
and line number.
You need a main form and subform in datasheet view. When the EmployeeID and
WorkWeek are entered in the main form the subform record source query pulls
any existing records for that employee for that week. On add new record a
macro (Set Value) would increment the line number by one (if no lines exist
then add one to zero).
 
Top