Problems with my Insert Statement
I have declared my variables (as below)
Private rsclients As ADODB.Recordset
Const connstr = "Provider=Microsoft.Jet.OLEDB.4.0:data source = f(and location of the file)"
Private conn As ADODB.Connection
Private cmdaddnewclient As ADODB.Command
Private required As long
Private sql As string
and then I have
sql = "insert into tblclients (Surname, Firstname, Street, Town, Postcode, Phone, Email, Arrival) Values (?,?,?,?,?,?,?,?)
(I don't know what the values are until the person presents themselves)
When I try to run the programme I get a message box 'Compile Error' 'User defined type not defined' in relation to my variable Private rsclients As ADODB.Recordset (rs to Recordset highlighted blue)
When I remark out this variable to see what happens this message just moves onto the next variable and the next.
What have I done wrong, or what have I not done?
How do I correct this problem?