Hi All
It wont give me the RIGHT() Function for my variable ‘r’.
Please cope and paste the code and you will see.
Any help appreciated
Thanks
It wont give me the RIGHT() Function for my variable ‘r’.
Please cope and paste the code and you will see.
Any help appreciated
Thanks
Code:
Sub mac1()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim r As String
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "G:\Knowledge\EndUser.mdb"
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
'Output the list of all users in the current database.
Debug.Print rs.Fields(0).Name
While Not rs.EOF
r = rs.Fields(0).Value
rs.MoveNext
Wend
MsgBox r
MsgBox Right(r, 4)
End Sub