I'm a 54 years old teacher, newbie in Visual Basic 6.0, who makes programmes for children. The programmes are freeware on the site www.snuffelsoft.be (in Dutch only) Now I want to create a table in a database (ADO) but the name of the table had to be a word from a textbox . Children had to fill there name in that textbox and a copy of a table (grammar words) must be made in the database. So each child can work with his own table .
This is the code I wrote:
Set cn = New Connection
Set rsnew = New Recordset
With cn
.Provider = "Microsoft.jet.oledb.4.0"
.ConnectionString = App.Path & "\spel3.mdb"
.Open
End With
If rsnew.State = adStateOpen Then
rsnew.Close
End If
rsnew.Open "Select * into" & " txtname " & "from basic3", cn, adOpenKeyset, adLockOptimistic
This is the code, and I want to change the txtname into a name from a textbox .
So I can create a table called Marie or Jim or Bart or ...