Hi Guys,
One of the bosses here at my work has gone away and left some databases in my care, unfortunately during an update one of them has fallen over and it happens to be the one I know absolutely nothing about!
Below is the code that's fallen over, I don't know if you'll be able to do anything with it but I'd greatly appreciate it if someone could take a look!
Function autoexec()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
'On Error GoTo autoexec_Err<o></o>
<o> </o>
DoCmd.SetWarnings False<o></o>
Const strSharedPath = "S:\ACCOUNTS\Common Files\"<o></o>
Dim fs, f, fc, fd(1), f1(1) As Object, fn As String, xyz, ARs, fa, intX As Integer, srtARName As String<o></o>
Set fs = CreateObject("Scripting.FileSystemObject")<o></o>
'Set f = fs.GetFolder("S:\ACCOUNTS\Common Files")<o></o>
'Set fc = f.Files<o></o>
'Set f1 = fc("Current AR Report Alianca.XLS")<o></o>
ARs = Array("Current AR Report Alianca.XLS", "Current AR Report HSUK.XLS")<o></o>
'Set fa = Array(fc(ARs(0)), fc(ARs(1)))<o></o>
For intX = 0 To 1<o></o>
srtARName = ARs(intX)<o></o>
Set f1(intX) = fs.getfile(strSharedPath & ARs(intX))<o></o>
fd(intX) = f1(intX).Datelastmodified<o></o>
<o> </o>
Next intX<o></o>
xyz = DMax("[date]", "[dateupdated]")<o></o>
' MsgBox "Ali " & fd(0) & " *** HSUK " & fd(1) & " *** " & xyz<o></o>
If fd(0) > xyz Or fd(1) > xyz Then<o></o>
<o></o>
Call updatedb<o></o>
Call massupdate<o></o>
End If<o></o>
<o> </o>
DoCmd.OpenForm "frontend", acNormal, "", "", , acNormal<o></o>
<o></o>
<o> </o>
autoexec_Exit:<o></o>
Exit Function<o></o>
<o> </o>
autoexec_Err:<o></o>
MsgBox Error$<o></o>
Resume Next<o></o>
<o> </o>
End Function
The bit in bold is the bit that's fallen over. Does anyone have any suggestions?!
One of the bosses here at my work has gone away and left some databases in my care, unfortunately during an update one of them has fallen over and it happens to be the one I know absolutely nothing about!
Below is the code that's fallen over, I don't know if you'll be able to do anything with it but I'd greatly appreciate it if someone could take a look!
Function autoexec()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
'On Error GoTo autoexec_Err<o></o>
<o> </o>
DoCmd.SetWarnings False<o></o>
Const strSharedPath = "S:\ACCOUNTS\Common Files\"<o></o>
Dim fs, f, fc, fd(1), f1(1) As Object, fn As String, xyz, ARs, fa, intX As Integer, srtARName As String<o></o>
Set fs = CreateObject("Scripting.FileSystemObject")<o></o>
'Set f = fs.GetFolder("S:\ACCOUNTS\Common Files")<o></o>
'Set fc = f.Files<o></o>
'Set f1 = fc("Current AR Report Alianca.XLS")<o></o>
ARs = Array("Current AR Report Alianca.XLS", "Current AR Report HSUK.XLS")<o></o>
'Set fa = Array(fc(ARs(0)), fc(ARs(1)))<o></o>
For intX = 0 To 1<o></o>
srtARName = ARs(intX)<o></o>
Set f1(intX) = fs.getfile(strSharedPath & ARs(intX))<o></o>
fd(intX) = f1(intX).Datelastmodified<o></o>
<o> </o>
Next intX<o></o>
xyz = DMax("[date]", "[dateupdated]")<o></o>
' MsgBox "Ali " & fd(0) & " *** HSUK " & fd(1) & " *** " & xyz<o></o>
If fd(0) > xyz Or fd(1) > xyz Then<o></o>
<o></o>
Call updatedb<o></o>
Call massupdate<o></o>
End If<o></o>
<o> </o>
DoCmd.OpenForm "frontend", acNormal, "", "", , acNormal<o></o>
<o></o>
<o> </o>
autoexec_Exit:<o></o>
Exit Function<o></o>
<o> </o>
autoexec_Err:<o></o>
MsgBox Error$<o></o>
Resume Next<o></o>
<o> </o>
End Function
The bit in bold is the bit that's fallen over. Does anyone have any suggestions?!