"Control Array" checkboxes

BRayVT

New member
Local time
Today, 06:12
Joined
Jan 14, 2008
Messages
2
I have a query called 'EmployeesCourses' that joins my Employee and Course tables to show which courses each employee is required to complete.

Im trying to create a form that will dynamically access the 'EmployeesCourses' query, create a list of the courses that a selected employee is required to complete, with a checkbox associated with each course. The user will then check each course that has been completed, click a command button, and my Records table will updated. (Records table simply records EmployeeName, Course, and Date.

My first thought was that I needed to 1) set up some kind of loop based on the number of records returned in the 'EmployeesCourses' query 2) create a checkbox for each record and assign the CourseName as the caption 3) somehow create an action query that would update my Records table with the "checked" courses. I just realized that VBA doesn't support control arrays, so Im kind of stuck. Im no programming expert, but I understand the basics of VBA and logic.

Any help would be greatly appreciated.
 
You are correct, VBA doesn't support controls arrays like VB does, but if you name you controls with prefixes like (cbo for combo box, cbx for checkbox, btn for button) you can then cycle through all the controls and just look for the type you need, it's not nearly as nice as a control array but it does work.
 

Users who are viewing this thread

Back
Top Bottom