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.
Addiing checkbox control in a list box
Collapse
X
-
Tags: None
-
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.
Jim -
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 FilesComment
Comment