Try this code in a form's On Load event to fill a list box with its
rowsource type set to value list. If you still get an error, you'll need to
check your permissions:
Private Sub Form_Load()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim i As Integer
Dim strTableNames
Set db = CurrentDb
For i = 0 To db.TableDefs.Count - 1
If Left(db.TableDefs(i).Name, 4) <> "Msys" Then
strTableNames = strTableNames & db.TableDefs(i).Name & ";"
End If
Next i
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.