I'm having a tough time with something that should be a snap. I have a combo box on a form and I just want to move the values from the combo box to the code so that each time the code runs, it selects the combo box values.
Each of the tables I want to open end with "_Enrollment" and the names in the combo box are like "James_Madison" and "Franklin"
Can anybody help me tweak this a bit to get it work? Thanks
-----
Dim comboElemen As Variant
Dim frmEnrollment_Forecast As Form
comboElemen = Form!frmEnrollment_Forecast!comboElementary
Set rst = dbs.OpenRecordset("'& comboElemen& '_Enrollment ", dbOpenDynaset)
Each of the tables I want to open end with "_Enrollment" and the names in the combo box are like "James_Madison" and "Franklin"
Can anybody help me tweak this a bit to get it work? Thanks
-----
Dim comboElemen As Variant
Dim frmEnrollment_Forecast As Form
comboElemen = Form!frmEnrollment_Forecast!comboElementary
Set rst = dbs.OpenRecordset("'& comboElemen& '_Enrollment ", dbOpenDynaset)