I have combo box set up based upon a table (Maintenance)containing the subform name and various y/n fields. (one of which is to make the form visible / invisible - column 3 in the table). Each subform is merely a view of a listing table that users can update, amend or delete records.
The idea is that the user selects the form from the combo box (MaintCmb)and the current subform disppears and the subform related to the combo box selection then appears on the after update event.I wanted to do it this way so that I can easily add more subforms to the table without having to hardcode them in the VB.
However I am having trouble getting this to work as I get an error saying that it cannot find the correct subform. Can someone please let me know what the VB is just confirm that I am using the correct code. Do I have to link the main form to the subform in both the form name in the table for the combo box or can I just use the subform name with the visible control ??
Thanks
The idea is that the user selects the form from the combo box (MaintCmb)and the current subform disppears and the subform related to the combo box selection then appears on the after update event.I wanted to do it this way so that I can easily add more subforms to the table without having to hardcode them in the VB.
However I am having trouble getting this to work as I get an error saying that it cannot find the correct subform. Can someone please let me know what the VB is just confirm that I am using the correct code. Do I have to link the main form to the subform in both the form name in the table for the combo box or can I just use the subform name with the visible control ??
Thanks