VB Error, Expected: end of statement.

whitelockben

Registered User.
Local time
Today, 22:20
Joined
Jun 29, 2011
Messages
25
Private Sub txtCN_Click()
Dim sPrefix As String
Dim Mysql As String
Dim sKey As String
Dim sSuffix As Integer
Dim X As Integer
Dim conn As New Adodb.Connections
Dim rs As New Adodb.Recordset

I get the error highlighted at Dim conn As New Adodb.Connections


The error I get is

Compile error:

User-defined type not defined

Can anyone help please?
 
Last edited:
An SQL statement needs a semicolon terminator

Mysql = "SELECT Max(CDbl(Mid([YouFieldName]," & X & "))) AS NewNum"
FROM tbl_YourTblName Where YourFieldName Like '" & sPrefix & "*'" & ";"
 
Dim conn As New Adodb.Connections

I get the error highlighted at Dim conn As New Adodb.Connections

In my mind, that should be without the trailing 's'

'Attributes
Private adoConn As ADODB.Connection
 
Oops, wrong thread - sorry! (Or has something been edited?)
 

Users who are viewing this thread

Back
Top Bottom