I'd like to improve the data entry for a form so that fewer mistakes are made when entering this number.
I have two tables. One is Projects the other is ProjectActivites
One Project can have multiple activities.
I have a form that shows a Project and in that form I have a subform that shows all the Project Activities.
Users can add new activities or view activities in that subform.
The number for the Project Activities I use is ProjectNr-ActivityNumber
i.e: 123-01
How can I automatically generate and increment this number ( 123-01, 123-02) based on ProjectNr and the number of existing Activities for this Project while maintaining the actual value in the database (Column ActivityNumber from the ProjectActivities table)
I tried something like this:
=DCount("[ActivityNumber]","ProjectActivities")& "-" & + 1
But even if this would work, the data won't be stored.
I have two tables. One is Projects the other is ProjectActivites
One Project can have multiple activities.
I have a form that shows a Project and in that form I have a subform that shows all the Project Activities.
Users can add new activities or view activities in that subform.
The number for the Project Activities I use is ProjectNr-ActivityNumber
i.e: 123-01
How can I automatically generate and increment this number ( 123-01, 123-02) based on ProjectNr and the number of existing Activities for this Project while maintaining the actual value in the database (Column ActivityNumber from the ProjectActivities table)
I tried something like this:
=DCount("[ActivityNumber]","ProjectActivities")& "-" & + 1
But even if this would work, the data won't be stored.