UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
> Error 3024, Access 2016    
 
   
noobdba
post Aug 23 2019, 04:51 PM
Post#1



Posts: 26
Joined: 21-June 19



So a bit of prologue:
I created an Access database for a small company. I split the database, leaving the be/back-end to be put on their server and the front-end on the users' computer. I told them to use the front-end I placed on their Desktop and not the back-end on their server. Seemed to go okay for a few weeks until I come in and see they're getting Error 3024. That the file can't be found. I search for the file on the user's computer and the server...can't find it. I believe it was deleted.

Disclaimer: I don't maintain their server.

I try to debug it and here's the code.

CODE
Private Sub cmd_login_Click()
Dim db As DAO.Database
  Dim rst As DAO.Recordset
  Dim strSQL As String

  If Trim(Me.txt_username.Value & vbNullString) = vbNullString Then
    MsgBox prompt:="Username should not be left blank.", buttons:=vbInformation, Title:="Username Required"
    Me.txt_username.SetFocus
    Exit Sub
  End If

  If Trim(Me.txt_password.Value & vbNullString) = vbNullString Then
    MsgBox prompt:="Password should not be left blank.", buttons:=vbInformation, Title:="Password Required"
    Me.txt_password.SetFocus
    Exit Sub
  End If

  'query to check if login details are correct
  strSQL = "SELECT FirstName FROM tbl_login WHERE Username = """ & Me.txt_username.Value & """ AND Password = """ & Me.txt_password.Value & """"

  Set db = CurrentDb
  Set rst = db.OpenRecordset(strSQL)
  If rst.EOF Then
    MsgBox prompt:="Incorrect username/password. Try again.", buttons:=vbCritical, Title:="Login Error"
    Me.txt_username.SetFocus
  Else
    MsgBox prompt:="Hello, " & rst.Fields(0).Value & ".", buttons:=vbOKOnly, Title:="Login Successful"
    DoCmd.Close acForm, "frm_login", acSaveYes
  End If

Set db = Nothing
Set rst = Nothing
DoCmd.OpenForm "Main Menu"
End Sub


It complains about the:
CODE
Set rst = db.OpenRecordset(strSQL)


I'm not sure if this is a symptom, but one of the users was saving the backups on the server instead of their computer.

I'm wondering if this is an issue I can solve myself, or do I need to the server admin?
Go to the top of the page
 

Posts in this topic



Custom Search


RSSSearch   Top   Lo-Fi    16th October 2019 - 04:28 AM