Why Error message - Could not find file C:\HCCTRL\CHEQUESbe.accdb .

Niroshana

New member
Local time
Today, 14:31
Joined
Jul 10, 2020
Messages
10
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
Dim dbs1 As dao.Database
Dim dbs2 As dao.Database

Set dbs1 = OpenDatabase("C:\HCCTRL\Backup.accdb", True, False, "MS Access;PWD=BANDA")
Set dbs2 = OpenDatabase("C:\HCCTRL\CHEQUESbe.accdb", True, False, "MS Access;PWD=DISSA")

dbs1.Execute "DROP TABLE BGTB;"
dbs2.Execute ("select BGTB.* into BGTB in 'C:\HCCTRL\Backup.accdb' from BGTB")

dbs1.Close
dbs2.Close

Exit_Command25_Click:
Exit Sub
Err_Command25_Click:
MsgBox Err.Description
Resume Exit_Command25_Click

End Sub
 

Attachments

  • Screenshot 2024-09-08 163650.png
    Screenshot 2024-09-08 163650.png
    78.7 KB · Views: 35
  • Screenshot1 2024-09-08 163848.png
    Screenshot1 2024-09-08 163848.png
    152.4 KB · Views: 37
Show us the file in Explorer :( as I do not believe you.
I would expect an underscore between CHEQUES and be ?
 
looks to me like an extra space before the .accdb in CHEQUESbe

00000.jpg
 

Users who are viewing this thread

Back
Top Bottom