I have a piece of code that is giving me the attached error message when I try running the VBScript Script File. This code worked perfectly when it was in my Access Database, but I am trying to learn about .vbs files so tried to replicate it in Notepad and VBS. I think I have traced it to the <> characters in the code, but I cannot think how to resolve it.
The Error I have been getting is:
Line: 5
Char: 15
Error: Syntax error
Code: 800A03EA
Source: Microsoft VBScript compilation error
The Error I have been getting is:
Line: 5
Char: 15
Error: Syntax error
Code: 800A03EA
Source: Microsoft VBScript compilation error
Code:
Option_Compare_Database
Private_Sub_Command0_Click()
Dim_accessApp_As_Object
Set_accessApp=GetObject("C:\Users\ME\Desktop\Automated_Database_Upload_Project\Automated_Upload_Database.accdb")
If_Err.Number_<>_0_Then
____Set_accessApp_=_CreateObject("Access.Application")
____accessApp.OpenCurrentDatabase_"C:\Users\ME\Desktop\Automated_Database_Upload_Project\Automated_Upload_Database.accdb",_False
____accessApp.Visible_=_True
____accessApp.UserControl_=_True
End_If
accessApp.Run_("UpdateTheDatabase")
End_Sub