David Trickett
Registered User.
- Local time
- Today, 09:26
- Joined
- Nov 20, 2002
- Messages
- 16
I have inherited an Access 97 database on a network which I am trying to control via VBA (I have been writing VBA code for Excel for ages but am *very* new to Access!).
Two of the tables in the database are "Cases" and "Workers". In the "Cases" table relevant fields are "Reference", "CaseName", "CaseworkerInitials" and "DateReportDue". In the "Workers" table relevant fields are "CaseworkerInitials" (which match those in "Cases") and "ManagerNumber".
I have written code which identifies the user, and whether he is a manager or caseworker. If a manager ManagerNumber is established.
What I have been asked to do is to provide a feature whereby if a manager opens the database he will be presented with a list of overdue reports for each of his caseworkers. The display will be optional but I imagine that this will be easy via ordinary VBA.
The logic would be:
1 For each CaseworkerInitials in "Workers" carrying this ManagerNumber get a list of References and CaseNames from Cases where DateReportDue is before today.
2 Output the list onto a form which would contain a Combo Box with the caseworkers names and a list box which would display Reference, Casename and DateReportDue for each caseworker selected from the combo box. The list should be sorted earliest date first. There should be an option to print the list for each caseworker. A real luxury would be to be able to e-mail the list to each caseworker, but I don't want to be greedy!
3. Display the form
I know this is complicated (which is why I can't figure out how to do it!), but I've got a boss swarming all over me demanding this to be done yesterday. There should be an icon for tearing ones hair out.
Thanks in advance for any help.
Two of the tables in the database are "Cases" and "Workers". In the "Cases" table relevant fields are "Reference", "CaseName", "CaseworkerInitials" and "DateReportDue". In the "Workers" table relevant fields are "CaseworkerInitials" (which match those in "Cases") and "ManagerNumber".
I have written code which identifies the user, and whether he is a manager or caseworker. If a manager ManagerNumber is established.
What I have been asked to do is to provide a feature whereby if a manager opens the database he will be presented with a list of overdue reports for each of his caseworkers. The display will be optional but I imagine that this will be easy via ordinary VBA.
The logic would be:
1 For each CaseworkerInitials in "Workers" carrying this ManagerNumber get a list of References and CaseNames from Cases where DateReportDue is before today.
2 Output the list onto a form which would contain a Combo Box with the caseworkers names and a list box which would display Reference, Casename and DateReportDue for each caseworker selected from the combo box. The list should be sorted earliest date first. There should be an option to print the list for each caseworker. A real luxury would be to be able to e-mail the list to each caseworker, but I don't want to be greedy!
3. Display the form
I know this is complicated (which is why I can't figure out how to do it!), but I've got a boss swarming all over me demanding this to be done yesterday. There should be an icon for tearing ones hair out.
Thanks in advance for any help.