By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,404 Members | 2,300 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,404 IT Pros & Developers. It's quick & easy.

How to read the volume serial Number of Hdd in Access

P: 2
Hello All people

I want to read the volume serial number of the partition of HDD , and put it in variable . it's possible

thanks in advance
Dec 23 '06 #1
Share this Question
Share on Google+
2 Replies


sashi
Expert 100+
P: 1,754
Hello All people

I want to read the volume serial number of the partition of HDD , and put it in variable . it's possible

thanks in advance
Hi there,

I have used this piece of code on VB, am not sure if it will work on MS-Access, give a try.Kindly refer to below attached code segment, hope it works. Good luck & Take care.

Expand|Select|Wrap|Line Numbers
  1. Dim FSO As New Scripting.FileSystemObject
  2. Dim drvVolume As Drive
  3. Dim volSerialNumber
  4.  
  5.   Set drvVolume = FSO.GetDrive("C")
  6.   volSerialNumber = Str(drvVolume.SerialNumber)
  7.  
Dec 24 '06 #2

Expert 5K+
P: 8,434
I have used this piece of code on VB, am not sure if it will work on MS-Access, give a try.Kindly refer to below attached code segment, hope it works. Good luck & Take care.
Expand|Select|Wrap|Line Numbers
  1. Dim FSO As New Scripting.FileSystemObject
  2. Dim drvVolume As Drive
  3. Dim volSerialNumber
  4. Set drvVolume = FSO.GetDrive("C")
  5. volSerialNumber = Str(drvVolume.SerialNumber)
  6.  
Using the file system object should work in Access, but you may need to add the Microsoft Scripting Runtime reference to your project. In VB6, this is definitely the case - Access, not so sure. But if it doesn't work "out of the box", this is one of the first things I would check.
Dec 26 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.