katzwhite
asked on
why doesn't GetDriveType(DrivetypeCode) work?
Access 2000 XP
I get a '1' back as the DrivetypeCode regardless of whether its running on a local or networked computer.
Any suggestions how to use this or suggest new code to determine if the db is on a networed or local computer.
Thanks
Elton
'Check if this is a network drive
'Return codes
'#####################
'The following codes are listed for reference
' DRIVE_UNKNOWN = 0
' DRIVE_ABSENT = 1
' DRIVE_REMOVABLE = 2
' DRIVE_FIXED = 3
' DRIVE_REMOTE = 4
' PDRIVE_CDROM = 5
' DRIVE_RAMDISK = 6
'#####################
MsgBox GetDriveType(DrivetypeCode )
I get a '1' back as the DrivetypeCode regardless of whether its running on a local or networked computer.
Any suggestions how to use this or suggest new code to determine if the db is on a networed or local computer.
Thanks
Elton
'Check if this is a network drive
'Return codes
'#####################
'The following codes are listed for reference
' DRIVE_UNKNOWN = 0
' DRIVE_ABSENT = 1
' DRIVE_REMOVABLE = 2
' DRIVE_FIXED = 3
' DRIVE_REMOTE = 4
' PDRIVE_CDROM = 5
' DRIVE_RAMDISK = 6
'#####################
MsgBox GetDriveType(DrivetypeCode
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You've both helped me understand the code (I'm not a very good VBA programmer). I didn't understand I had to include the drive letter of the drive I needed checked, makes sense now.
I'm going to split the points.
Thanks for the help.
Elton