this code is from another form before i get to the formload below
xNum = 2
adminlec.show
unload me
Private Sub Form_Load()
lblLECNUM.Caption = xNUM '<----this is a public dim that i wrote on a module as integer
Set cnn = New ADODB.connection
Set rs = New ADODB.Recordset
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\MAINDB2.mdb" & ";Persist Security Info=False"
cnn.CursorLocation = adUseServer
cnn.Open
rs.LockType = adLockPessimistic
rs.CursorLocation = adUseClient
rs.Source = ("SELECT * from tblLecture where arlNumber = '" & lblLECNUM & "' ")
rs.ActiveConnection = cnn
rs.Open '<---------THIS IS HIGHLIGHTED WHEN I GOT THE ERROR
rs.Update
If rs.BOF = True Or rs.EOF = True Then
rs.MoveNext
Exit Sub
'If the pointer is at the end of the recordset of
'at the before the first record, exit the sub and
'show no data.
End If
RtxtLec.Text = rs.Fields("arlLec").Value & ""
txtNum.Text = rs.Fields("arlNumber").Value & ""
txtPart.Text = rs.Fields("arlPart").Value & ""
End Sub
there's my code, im having a error "DATA TYPE MISMATCH IN CRITERIA EXPRESSION "
but i cnt and no idea where it is.... and im still finding it
i'm performing to have a connection to my database and as you see my query below
im getting the value of lblLECNUM(which is 2)
("SELECT * from tblLecture where arlNumber = '" & lblLECNUM & "' ")
pls help me!! getting dizzy solving this