M
M.Garza
Hello,
I've tried these groups before and been helped tremendously, thanks!
I have a database that I am working on right now that has me really
confused. I am being asked to develop a database that tracks projects
for our agency. This is what they want:
Form with drop down menu with each department (done)
From the form above, have another form "appear" that shows the
employees related to that department where he/she can select her name
via a click button (done with coding found on internet)
Then have another form "appear" that only inludes the tasks related to
that employee (somewhat done)
Then have another form to show any related secondary tasks that
employee is involved with.
This is what I have:
Tbls:
ProjTbl, lists projects
DeptTbl, lists departments
Dept_EmplTbl, lists employees and department
Emp_onProjTbl, lists project, employees on project and tasks assigned
Tables are related by project, department, employeeID
1. Department form with unbound txt box searches query for department
and edit button (yes/no)
2. Subform, Employees, two fields, "Employeetxt" and "Update
Task" (yes/no) linked to Department form by Department that opens when
edit button is clicked
3. Two functions:
Private Sub Form_Current()
If Me.Edit = True Then
Me.Employees.Visible = True
Else
Me.Employees.Visible = False
End If
End Sub
Private Sub Edit_AfterUpdate()
If Me.Edit = True Then
Me.Employees.Visible = True
Else
Me.Employees.Visible = False
End If
End Sub
4. Tasks form that holds all tasks assiged to each employee.
Currently, I have this form "pop-up" when the "Update Task" button in
the Employee form is clicked, then uncheck when the Update Task button
on exit of Task form.
Private Sub Update_Task_AfterUpdate()
If Me.Update_Task.Value = True Then DoCmd.OpenForm
"Tasks", , , , , acDialog
Me.Update_Task = False
End Sub
I need to have the Task form "appear" instead of "pop-up" and I also
need it to open up only with those records that are related to the
employee that clicked the "Update Task" button.
I tried doing the same for the "Employees/Task" forms that I did with
the first two forms (DepartmentForm/EmployeesSubform/Hide/Visible) but
I can't have the main form be continous forms if I am adding a
subform, so that didn't work (they want only the names of the
employees within the department they checked to show up).
I know for sure that part of my problem is, if the employee only
selects the Update Task button without referring to their name, how
would ACCESS know to "call" the Task form with only their tasks? I
don't know the answer to this. Tried doing setfocus on that field
once the Update Task fired to see if I could use that to filter but it
only went to that field after I closed the Task form.
Any help I could get will be greatly appreciated. This is a sort of a
challenge for me because there are several people that don't think I
can do it and I want to prove them totally wrong, assuming it is
possible. I've built several databases (very basic) with the help
I've been able to find on the internet, books, and personal
experience.
HELP and THANK YOU!
I've tried these groups before and been helped tremendously, thanks!
I have a database that I am working on right now that has me really
confused. I am being asked to develop a database that tracks projects
for our agency. This is what they want:
Form with drop down menu with each department (done)
From the form above, have another form "appear" that shows the
employees related to that department where he/she can select her name
via a click button (done with coding found on internet)
Then have another form "appear" that only inludes the tasks related to
that employee (somewhat done)
Then have another form to show any related secondary tasks that
employee is involved with.
This is what I have:
Tbls:
ProjTbl, lists projects
DeptTbl, lists departments
Dept_EmplTbl, lists employees and department
Emp_onProjTbl, lists project, employees on project and tasks assigned
Tables are related by project, department, employeeID
1. Department form with unbound txt box searches query for department
and edit button (yes/no)
2. Subform, Employees, two fields, "Employeetxt" and "Update
Task" (yes/no) linked to Department form by Department that opens when
edit button is clicked
3. Two functions:
Private Sub Form_Current()
If Me.Edit = True Then
Me.Employees.Visible = True
Else
Me.Employees.Visible = False
End If
End Sub
Private Sub Edit_AfterUpdate()
If Me.Edit = True Then
Me.Employees.Visible = True
Else
Me.Employees.Visible = False
End If
End Sub
4. Tasks form that holds all tasks assiged to each employee.
Currently, I have this form "pop-up" when the "Update Task" button in
the Employee form is clicked, then uncheck when the Update Task button
on exit of Task form.
Private Sub Update_Task_AfterUpdate()
If Me.Update_Task.Value = True Then DoCmd.OpenForm
"Tasks", , , , , acDialog
Me.Update_Task = False
End Sub
I need to have the Task form "appear" instead of "pop-up" and I also
need it to open up only with those records that are related to the
employee that clicked the "Update Task" button.
I tried doing the same for the "Employees/Task" forms that I did with
the first two forms (DepartmentForm/EmployeesSubform/Hide/Visible) but
I can't have the main form be continous forms if I am adding a
subform, so that didn't work (they want only the names of the
employees within the department they checked to show up).
I know for sure that part of my problem is, if the employee only
selects the Update Task button without referring to their name, how
would ACCESS know to "call" the Task form with only their tasks? I
don't know the answer to this. Tried doing setfocus on that field
once the Update Task fired to see if I could use that to filter but it
only went to that field after I closed the Task form.
Any help I could get will be greatly appreciated. This is a sort of a
challenge for me because there are several people that don't think I
can do it and I want to prove them totally wrong, assuming it is
possible. I've built several databases (very basic) with the help
I've been able to find on the internet, books, and personal
experience.
HELP and THANK YOU!