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 then the location of the file)"
Private conn As ADODB.Connection
Private cmdaddnewclient As ADODB.Command
Private required As long
Private sql As String
Then I have
sql = "insert into tblclients (Surname, Firstname, Street, Town, Postcode, Phone, Email, Arrival) Values (?,?,?,?,?,?,?,?)
(I don't know the values until the person presents themselves at reception for check-in)
When I try to run the programme I get a message box 'Compile Error' 'User defined type not defined' on my first variable Private rsclients As ADODB.Recordset (from rs to Recordset highlighted blue).
When I 'remark out' this variable to see what happens the message just move onto the next variable and the next one.
What have I done wrong, or what have I not done?
How do I correct this problem?
Thanks for your help
Brendan
|