Hi
How can i count the number of data that is inside a Dbcombo box?
Thanks in advance
Printable View
Hi
How can i count the number of data that is inside a Dbcombo box?
Thanks in advance
Assuming you filled the combobox with something like;
MyRS.Open "SELECT name FROM tbl_Names",MyConn
You can use
MyRs.Open "SELECT COUNT(name) AS Total FROM tbl_Names",MyConn
Total=MyRs("Total")
to get the total number if items in the box.
Well, what about
Total = MyDBCombo.visiblecount
that should work too!