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

Access VBA - CurrentDb.Recordsets is empty

P: 69
As my Access form opens, I want it to find the names of the tables in the current Access database and populate a combobox with the table (recordset) names. Problem is, the CurrentDb.Recordsets object is empty even though I have two tables in the database. I'm using the code below, but the combobox remains empty. That's because CurrentDB.Recordsets is empty. Is this a bug with CurrentDb or have I done something dumb?

Dim TBL As DAO.Recordset

For Each TBL In CurrentDb.Recordsets
Combobox.RowSource = Combobox.RowSource & TBL.Name & ";"
Next TBL
Mar 21 '07 #1
Share this Question
Share on Google+
1 Reply


P: 69
My appologies. I've posted this to the wrong forum. I'll re-post in the Access forum.

As my Access form opens, I want it to find the names of the tables in the current Access database and populate a combobox with the table (recordset) names. Problem is, the CurrentDb.Recordsets object is empty even though I have two tables in the database. I'm using the code below, but the combobox remains empty. That's because CurrentDB.Recordsets is empty. Is this a bug with CurrentDb or have I done something dumb?

Dim TBL As DAO.Recordset

For Each TBL In CurrentDb.Recordsets
Combobox.RowSource = Combobox.RowSource & TBL.Name & ";"
Next TBL
Mar 21 '07 #2

Post your reply

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