I am working on a contact management database. Each contact may have resources. We are a non-profit employment agency for people with disabilities, so these resources are types of employment offered from the contact. The resources are described in two tables JobClass and JobName. An example of a JobClass is 'Customer Service', and an example of a JobName within 'Customer Service' would be 'Cashier'. I need to be able to view, add or delete resources in the form, but I am having mixed success with mostly failure, and I know there must be an easier way.
My most successful method has been with main form with the contact info, and a list of assigned Classes and JobNames (these are subforms, continuous forms) and a subform containing 2 combo boxes (class and jobname), a frame option group with add or delete options, and the add and delete buttons.
I have code that accurately lists JobClasses not selected for the current contact, or lists all current JobClasses (to select one to be deleted). And since the JobNames available is dependant on a JobClass having already been selected, I have created code which accurately produces a list of available jobnames (that are both not currently selected for the contact and are associated with job classes already selected for the contact). Similarly, I can produce a list of JobNames currently assigned to the contact to be deleted. All of these functions work correctly, and I can delete or add items. But I can only do it once, and I can only do it for the first contact. I am having problems with refreshing the view after adding or deleting, or moving to a new record. I am also having problems with refreshing the individual lists after changes.
Okay, that was a long explanation, and I hope it was clear. First off, am I going about this the right way? Is there a simpler method that I have overlooked that can provide the same results?
I have tried using list boxes, but I cannot get the list box to update correctly to the underlying table, nor to update correctly when moving from one contact to the next. The simplest method I can think of would be to use yes/no boxes for each list, but I have no idea what the final lists of resources will be, so adding a check box to the table everytime a new resource is requested does not seem reasonable.
My code for these lists and actions is basically creating 4 temp queries (addClass, delClass, addJobName, and delJobName), and deleting them in the 'after update' event of the respective list. The buttons on the subform for add or delete copy to the ID# from the selected list in the on click event. If posting the code will be helpful, I can do that.
Any help would be appreciated. Thanks!
My most successful method has been with main form with the contact info, and a list of assigned Classes and JobNames (these are subforms, continuous forms) and a subform containing 2 combo boxes (class and jobname), a frame option group with add or delete options, and the add and delete buttons.
I have code that accurately lists JobClasses not selected for the current contact, or lists all current JobClasses (to select one to be deleted). And since the JobNames available is dependant on a JobClass having already been selected, I have created code which accurately produces a list of available jobnames (that are both not currently selected for the contact and are associated with job classes already selected for the contact). Similarly, I can produce a list of JobNames currently assigned to the contact to be deleted. All of these functions work correctly, and I can delete or add items. But I can only do it once, and I can only do it for the first contact. I am having problems with refreshing the view after adding or deleting, or moving to a new record. I am also having problems with refreshing the individual lists after changes.
Okay, that was a long explanation, and I hope it was clear. First off, am I going about this the right way? Is there a simpler method that I have overlooked that can provide the same results?
I have tried using list boxes, but I cannot get the list box to update correctly to the underlying table, nor to update correctly when moving from one contact to the next. The simplest method I can think of would be to use yes/no boxes for each list, but I have no idea what the final lists of resources will be, so adding a check box to the table everytime a new resource is requested does not seem reasonable.
My code for these lists and actions is basically creating 4 temp queries (addClass, delClass, addJobName, and delJobName), and deleting them in the 'after update' event of the respective list. The buttons on the subform for add or delete copy to the ID# from the selected list in the on click event. If posting the code will be helpful, I can do that.
Any help would be appreciated. Thanks!