instructorTek
Instructor
- Jun 5, 2006
- 61
Hi can anyone help. I have an app written using Access 2003, a particular form in the app uses windows API functions in addition to the VBA. This form does not open on win 98 or win 2000 operating systems, although Access 2000 is installed. It opens in win ME and XP with Access 2000. I downloaded a win 98 scripting update from Microsoft but the form still did not open, only the grey Access screen remains visible when the form is opened. Any help will be appreciated. The code is as follows:
Private Sub Form_Open(Cancel As Integer)
'Determines the drive letter of CDROM and checks for a file on the CD
'The CD must be in the drive for the user to continue
Dim strDriveLetter As String
Set fso = CreateObject("Scripting.FileSystemObject")
For Each drv In fso.Drives
If drv.drivetype = 4 Then
strDriveLetter = drv.driveletter
End If
Next
If Not fso.FileExists(strDriveLetter & ":\test.txt") = True Then
DoCmd.Close
DoCmd.OpenForm "frmNoCd", acNormal, "", "", , acNormal
End If
End Sub
Private Sub Form_Open(Cancel As Integer)
'Determines the drive letter of CDROM and checks for a file on the CD
'The CD must be in the drive for the user to continue
Dim strDriveLetter As String
Set fso = CreateObject("Scripting.FileSystemObject")
For Each drv In fso.Drives
If drv.drivetype = 4 Then
strDriveLetter = drv.driveletter
End If
Next
If Not fso.FileExists(strDriveLetter & ":\test.txt") = True Then
DoCmd.Close
DoCmd.OpenForm "frmNoCd", acNormal, "", "", , acNormal
End If
End Sub