Private Sub Form_Load()
On Error GoTo FormLoadError
'---------------------------------------
'delete the flash shortcut
Dim shell As Object
Dim link As Object
Dim DesktopPath As String
Set shell = CreateObject("WScript.Shell")
DesktopPath = shell.SpecialFolders("AllUsersDesktop")
fso.DeleteFile DesktopPath & "\Agent Prospecting Presentation.lnk"
'create a new flash shortcut
'because we are replacing the old exe
Set shell = CreateObject("WScript.Shell")
DesktopPath = shell.SpecialFolders("AllUsersDesktop")
Set link = shell.CreateShortcut(DesktopPath & "\Agent Prospecting Presentation.lnk")
'link.Arguments = "1 2 3"
link.Description = "Agent Prospecting Presentation"
'link.HotKey = "CTRL+ALT+SHIFT+X"
link.IconLocation = "C:\WestfieldInsurance\Westfield_1to1F_v1.exe,1"
link.TargetPath = "C:\MyWestfieldPresentation\Westfield_1to1F_v1.exe"
'window style 3=maximized, 2=normal
link.WindowStyle = 2
'start in
link.WorkingDirectory = "C:\MyWestfieldPresentation"
link.Save
'this code modifies the existing database without overwriting user data
'create new table
Call CreateConnection(objConn)
objConn.Execute "CREATE TABLE TempDocAudio(n_id TEXT(50))"
Call CloseConnection(objConn)
'modify Documents and Campaign tables
Call CreateConnection(objConn)
objConn.Execute "ALTER TABLE Documents ADD COLUMN n_mp3 TEXT(50)"
'cannot use default parameters with ODBC connectivity must switch to OLEDB
objConn.Execute "ALTER TABLE Documents ADD COLUMN n_wavBol TEXT(50)DEFAULT FALSE"
'add wespak and defender columns
objConn.Execute "ALTER TABLE Campaign ADD COLUMN c_wespakOn TEXT(50)DEFAULT 1"
objConn.Execute "ALTER TABLE Campaign ADD COLUMN c_defenderOn TEXT(50)DEFAULT 1"
Call CloseConnection(objConn)
'delete from bios Bud Leister and Reg Stith
Call CreateConnection(objConn)
objConn.Execute "DELETE FROM Bios WHERE b_name=""Bud Leister"" OR b_name=""Reg Stith"""
'MsgBox ("deleted")
Call CloseConnection(objConn)
' Error handler
FormLoadError:
If Err.Number <> 0 Then
errLogger Err.Number, Err.Description, "This error created on:"
'Debug.Print errLogger
Err.Clear
Resume Next
'Exit Sub
End If
End Sub