Here's My Set of codes, but i've got a problem in my record "rs.open SQL, SETCONNECT, adOpenKeyset, adLockOptimistic"
But still the same problem. I ve got this error.

Run-time error '3709'

the connection cannot be used to perform this operation.
it is either closed or invalid in this context.


Please help me reconstruct my codes.

-----------------
CODES
-----------------
Module1
------------------
Option Explicit
Public rs As ADODB.Recordset
Private cn As ADODB.Connection

Sub Main()
Dim cmd As String

cmd = "ODBC;DATABASE=ems_ho1;UID="";PWD="";DSN=ems_ho1"

Set cn = New ADODB.Connection
With cn
.ConnectionString = cmd
.open
End With
End Sub

Public Sub SETCONNECT()
Set Form1.CURRENTCONNECT = cn
End Sub

------------------------
FORM1
------------------------

Option Explicit
Public SETCONNECT As ADODB.Connection
Dim rs As ADODB.Recordset
Public Property Set CURRENTCONNECT(Setting As ADODB.Connection)
Set SETCONNECT = Setting
End Property

Private Sub loadinfo()
Dim SQL As String

Set rs = New ADODB.Recordset

SQL = "SELECT master.CARD_CODE, master.FIRSTNAME, master.LASTNAME, master.TITLE, master.DEPARTMENT, master.MI, master.Course, master.Photograph_File_Name, verification.Dept, verification.Acctg, verification.Reg, verification.DO, verification.LRC, verification.Guid, verification.Foreign, verification.IClab, verification.ITC, verification.OTHERS, verification.Status, verification.Remarks FROM master LEFT JOIN verification ON master.CARD_CODE = verification.ID_num WHERE (((master.CARD_CODE)='" + txt_StudNo.Text + "'));"

rs.open SQL, SETCONNECT, adOpenKeyset, adLockOptimistic

If Not rs.RecordCount Then

If rs("status") = "1" Then
Label6 = " Accounting " & rs("Acctg")
ELSE
MSGBOX "Clear"
end if
end if
rs.close
cn.close
end sub

Codes Something like that, correct me if im wrong.

Please help me.

Thanks in advance.

Jay