By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,939 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,939 IT Pros & Developers. It's quick & easy.

Addiing checkbox control in a list box

P: 1
I want to popolate one column of the recordset in the first column on the list box & also want to add checkbox in the second column of the list, All these things I want to do during runtime depending on the number of rows in the recordset.
Jul 17 '10 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,240
A "checkbox" is a graphical representation of a true/false data item. There is no way to make a list box present the column graphically. You can make the underlying query return strings instead of the actual data (i.e 'yes' for a -1, 'no' for a 0 or any other string you choose true/false, shippped/not shipped, posted /not posted ....) but you cannot show a checkbox per se.

"Depending on the number of rows in the recordset" doesn't make any sense in this context. Tell us more about what you want to do.

Jul 17 '10 #2

P: 8
You could use a combobox, with it's RowSource based on a table containing the information/checkboxes you want to display. For example, I have 2 tables: tblPC and tblUsers.
tblPC: PCID*, ComputerName (txt), UserID (num)
tblUsers: UserID*, UserName (txt), Awesome? (yes/no)
tblPC and tblUsers are related 1:many by UserID.
frmPC has a combobox with it's RowSource set to tblUsers, and a Column Count of 3 (Column Size = 0,1,1). When you expand the combobox, it shows the UserName | Awesome? fields.
Then add the Awesome? field to frmPC's record source and add a Awesome as a checkbox control to frmPC.
I hope that helps. Your question was a bit vague.
Attached Images
File Type: jpg answer scr1.jpg (7.0 KB, 274 views)
Jul 17 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.