Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2004, 04:38 AM
Registered User
 
Join Date: Dec 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?

Thanks Brendan

 
Old January 6th, 2004, 08:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Cross post with this thread http://p2p.wrox.com/topic.asp?TOPIC_ID=8248





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Statement Iashia06 Access 0 April 7th, 2006 12:45 PM
What is wrong with this insert statement? method SQL Server 2000 13 April 27th, 2005 11:46 PM
Problems with my Insert Statement brendan82 Beginning VB 6 1 January 6th, 2004 08:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.