Easy one this !!
I have encased my code within "DEPLOYMENT TEXT"
My recordset is a query feuqryCRTSK
I'm just not sure that everything within the "DEPLOYMENT" is referencing this query as it doesn't work.
fileTargettext
If you could point me in the right direction then that would be fantastic.
I have encased my code within "DEPLOYMENT TEXT"
My recordset is a query feuqryCRTSK
I'm just not sure that everything within the "DEPLOYMENT" is referencing this query as it doesn't work.
fileTargettext
Code:
Public Sub trusteecreate()
TSKGetFile = "S:\Access\DATA\TT\Front Ends\TRUSTEE TASKS.accdr"
TSKUdFile = "S:\Access\DATA\UPDATER\TRUSTEE TASKS.accdr"
Dim rs As dao.Recordset
Set rs = CurrentDb.OpenRecordset("feuqryCRTSK", dbOpenSnapshot)
With rs
If Not (.BOF And .EOF) Then .MoveFirst
While Not .EOF
DoCmd.SetWarnings False
On Error Resume Next
TSKDestFile1 = "S:\Access\DATABASES\" & !Employee & "\TRUSTEE TASKS.accdr"
DoCmd.SetWarnings False
FileCopy TSKGetFile, TSKUdFile
FileCopy TSKUdFile, TSKDestFile1
Kill TSKUdFile
DoCmd.SetWarnings True
'------------------------------------------------------------
'
'
' START OF DELOYMENT CODE
'
'
'------------------------------------------------------------
Dim WSHShell
Dim MyShortcut
Dim DesktopPath
Dim FileTarget As String
FileTarget = fileTargettext
Dim Desktop As String
Desktop = networktext
Dim filename As String
filename = filename
Dim shortcut As String
shortcut = shortcutNametxt
Set WSHShell = CreateObject("WScript.Shell")
If Not WSHShell Is Nothing Then
DesktopPath = WSHShell.SpecialFolders("Desktop")
Set MyShortcut = WSHShell.CreateShortCut(Desktop & "\" & shortcut)
MyShortcut.TargetPath = FileTarget & "\" & filename
MyShortcut.WorkingDirectory = Desktop
MyShortcut.WindowStyle = 1
MyShortcut.Arguments = ""
MyShortcut.Save
Set MyShortcut = Nothing
End If
'------------------------------------------------------------
'
'
' END OF DELOYMENT CODE
'
'
'------------------------------------------------------------
.MoveNext
Wend
.Close
End With
Set rs = Nothing
End Sub
If you could point me in the right direction then that would be fantastic.