Please help me..What is wrong with this syntax...there are 2 parts of error..
Private Sub class_initialize()
DoEvents
Set con = New ADODB.Connection
With con
.ConnectionString = "Driver=(MySQL ODBC 3.51 Driver);SERVER=localhost;PWD=;UID=root;PORT=3306;DATABASe=cvsur;"
.CursorLocation = adUseClient
.Open
End With
End Sub
.Open was the error from this syntax..(Sytax Above)
______________________________________________________________
And another one is this..
Private Sub cmdSave_Click()
Set rs = New ADODB.Recordset
rs.Open "select * from tbl_account", con, 3, 3
With rs
'.AddNew
.Fields("fname") = fname.Text
.Fields("mname") = mname.Text
.Fields("lname") = lname.Text
.Fields("idnum") = idnum.Text
.Fields("acode") = acode.Text
.Fields("password") = password.Text
.Fields("gend") = gend.Text
.Fields("contact") = contact.Text
.Fields("address") = address.Text
.Update
End With
MsgBox "New Data has been saved!"
fname.Text = ""
mname.Text = ""
lname.Text = ""
idnum.Text = ""
acode.Text = ""
password.Text = ""
gend.Text = ""
contact.Text = ""
address.Text = ""
Set rs = Nothing
End Sub
The error from this syntax is on this line rs.Open "select * from tbl_account", con, 3, 3