I was building an Acccess database where everything was running fine on my old laptop.
I ran on a new computer, and I am getting the below error.
The Microsoft Office Access database engine could not find the object '1'. Make sure the object exists and that you spell its name and path name correctly.
Basically I have a main form where I have an option to select 'search by last name' this opens up a new form that is fed data based off a simple query.
The code below should be straightforward so I don't see what I am missing here.
Lookup By Last Name is the 'Form', and the Query is called Search By Last Name.
Any help would be appreciated.
Thanks
Private Sub Search_By_Last_Name_Click()
On Error GoTo Err_Search_By_Last_Name_Click
Dim stDocName As String
stDocName = "Lookup By Last Name"
DoCmd.OpenForm stDocName, acNormal, acEdit
Exit_Search_By_Last_Name_Click:
Exit Sub
Err_Search_By_Last_Name_Click:
MsgBox Err.Description
Resume Exit_Search_By_Last_Name_Click
End Sub
I ran on a new computer, and I am getting the below error.
The Microsoft Office Access database engine could not find the object '1'. Make sure the object exists and that you spell its name and path name correctly.
Basically I have a main form where I have an option to select 'search by last name' this opens up a new form that is fed data based off a simple query.
The code below should be straightforward so I don't see what I am missing here.
Lookup By Last Name is the 'Form', and the Query is called Search By Last Name.
Any help would be appreciated.
Thanks
Private Sub Search_By_Last_Name_Click()
On Error GoTo Err_Search_By_Last_Name_Click
Dim stDocName As String
stDocName = "Lookup By Last Name"
DoCmd.OpenForm stDocName, acNormal, acEdit
Exit_Search_By_Last_Name_Click:
Exit Sub
Err_Search_By_Last_Name_Click:
MsgBox Err.Description
Resume Exit_Search_By_Last_Name_Click
End Sub