Link to home
Start Free TrialLog in
Avatar of katzwhite
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)
SOLUTION
Avatar of heer2351
heer2351

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of katzwhite
katzwhite

ASKER

capricorn1 & heer2351,

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