Hi everybody, as usual. I have this database with the purpose to storage all the tasks that are done in my team. I have a table named Tasks with all their fields. Now, I would like to set a more user friendly way for clients to update this table. I have created another table with a list of most common tasks, so when a client wants to add their tasks list they can choose one of this tasks and add it to the list. I had created a form with multiple items that contains the common tasks and next to each task a button that adds the information they choose into the table "Tasks". This works just fine. However, I would like to add a single button at the top to add all the tasks instead of having to choose one after one. Can you please help to do this? I know there must be some kind of loop but I do not know how to do it.
The "Add All tasks" button has this code:
Thanks in advance for all your help!
The "Add All tasks" button has this code:
Code:
Private Sub Command79_Click()
Dim valSelect As Variant, MyDB As DAO.Database, MyRS As DAO.Recordset
Set MyDB = CurrentDb()
Set MyRS = MyDB.OpenRecordset("Tasks", dbOpenDynaset)
MyRS.AddNew
MyRS![TransactionalTime] = TransactionalTime
MyRS![ConstantTime] = ConstantTime
MyRS![TaskName] = TaskName
MyRS![GuID] = GU
MyRS![TeamID] = Team
MyRS![VisaID] = Category
MyRS.Update
MyRS.Close
Set MyRS = Nothing
End Sub
Thanks in advance for all your help!