SilverFlyer
Technical User
Hi all
First time poster and long time lurker.
I've been tasked with creating a basic Access database for a colleague. I've worked as a reporting analyst for many years so I have a good understanding of database structure and SQL but this is my first time creating a database from scratch and writing VBA.
In essence, the DB is based on two linked tables; 1. Projects, 2. Project Tasks. The core form contains the Project Details with a subform containing a continuous list of the Project Tasks. Double clicking on the task list opens up the Task details form in a dialog window. This is all working fine.
I have a requirement to create a 'Duplicate Project' button on the Project form. On clicking the button, I need the following steps to perform:
1. open a new blank record
2. copy/load 'ProjectTitle', 'ProjectCategory','ProjectMember' from original record (Record A)
3. set the 'ProjectID' to the next number in the Autonumber sequence (not leave as (New))
4. set the 'PriorProjectID' on Record B from 'ProjectID' from Record A
5. set the 'ProjectStatus' to "Work in Progress"
6. set the 'ProjectStartDate' to Date()
I've tried various approaches but I can only get 90% of the above to work. I can detail the precise approaches I tried and the VBA but I would be interested to hear opinions on the best practice approach to take rather than derail with my possibly clumsy attempts.
Many thanks.
First time poster and long time lurker.
I've been tasked with creating a basic Access database for a colleague. I've worked as a reporting analyst for many years so I have a good understanding of database structure and SQL but this is my first time creating a database from scratch and writing VBA.
In essence, the DB is based on two linked tables; 1. Projects, 2. Project Tasks. The core form contains the Project Details with a subform containing a continuous list of the Project Tasks. Double clicking on the task list opens up the Task details form in a dialog window. This is all working fine.
I have a requirement to create a 'Duplicate Project' button on the Project form. On clicking the button, I need the following steps to perform:
1. open a new blank record
2. copy/load 'ProjectTitle', 'ProjectCategory','ProjectMember' from original record (Record A)
3. set the 'ProjectID' to the next number in the Autonumber sequence (not leave as (New))
4. set the 'PriorProjectID' on Record B from 'ProjectID' from Record A
5. set the 'ProjectStatus' to "Work in Progress"
6. set the 'ProjectStartDate' to Date()
I've tried various approaches but I can only get 90% of the above to work. I can detail the precise approaches I tried and the VBA but I would be interested to hear opinions on the best practice approach to take rather than derail with my possibly clumsy attempts.
Many thanks.