I try to use a form with TableView = TRUE and SQLName to show Values of a MySQL-table in a form with a table. I use the tablename or the statement "SELECT * FROM " & tablename to fil the SQLName. In both case I get a error: Error in SQLName = tyblename / SQL-statement
- Code: Select all
Private Sub Form_OnOpen()
Dim sSQL as String
sSQL = "SELECT * FROM " & ho_TBL
Database.SetCurrentDatabase(ho_DB)
frm_WorkTable.SQLName = ho_TBL ' or sSQL
End Sub
ho_DB and ho_TBL are declared as public varables and filled in the calling routine. The database is connected. The table have no kbRecordID.
I don't know, what's going wrong. What must I do, to get the tablevalues in a form with a table?