No Read Permissions on Access 2003 Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • evilbungle
    New Member
    • Apr 2008
    • 26

    No Read Permissions on Access 2003 Table

    Good Morning,

    I am trying to build an application that will take the details from an access database and use them as log in details but I can not get the App to open the table as I keep getting the error Record(s) cannot be read; no read permissions on tbl_users_agb I built the database that has the table so there should not be an issue with permissions. the code I entered is as follows.

    Code:
       Private Sub frmSwitchboard_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim ConSTDB As ADODB.Connection
            Dim strPath As String
            Dim rsLogin As ADODB.Recordset
    
            strPath = "\\Customer\shared\Bengeworth\Access\Metering Service West\Performance Test\Server\Staff_Database_svr.mdb"
            ConSTDB = New ADODB.Connection
            ConSTDB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strPath & ";"
            ConSTDB.Open()
    
            txtLogin.Text = GetUserName
            rsLogin = ConSTDB.Execute("SELECT * FROM tbl_Users_agb WHERE tbl_Users_agb.User_id = " & GetUserName)
    
            If rsLogin.EOF = True Then
                MsgBox("Error No User Found" & vbNewLine & "Please Contact Performance Team")
            Else
                Me.txtName.Text = rsLogin.Fields("Name").Value
                Me.txtAuthLevel.Text = rsLogin.Fields("Group").Value
            End If
        End Sub
    In this code Staff_Database_ Svr (Access 2003) is the back end of our staff database and holds the data I need in the tbl_Users_agb there is no password to access the database.

    I am sure I am probably missing something simple but if you can give me a hand I would appreciate it.
Working...