DerFuzh
asked on
MS Access: Open specific directory from field criteria
I am familier with the code for opening an explorer directory from MS access, but I need to take it one step further. I would like to be able to use the data from a field as criteria in the string for opening the directory.
For example:
I have a form with a feild for SSNs. I also have a directory with folders named specific SSNs. I would like to have the code below use the current recordset and open the folder that matches the data in the field.
Is it similar to using a field for a parameter query [forms]![frmSomeForm]![Som eField]... ...?
Private Sub openDirectory_Click()
Shell "explorer.exe C:\ScannedFiles\........", vbNormalFocus
End Sub
Any help is greatly appreciated!
For example:
I have a form with a feild for SSNs. I also have a directory with folders named specific SSNs. I would like to have the code below use the current recordset and open the folder that matches the data in the field.
Is it similar to using a field for a parameter query [forms]![frmSomeForm]![Som
Private Sub openDirectory_Click()
Shell "explorer.exe C:\ScannedFiles\........",
End Sub
Any help is greatly appreciated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Really, you have folders named with the value of SSNs?
Hope you are prepared for the lawsuits that will accompany that when someone who shouldn't have access to the server gets access.
Hope you are prepared for the lawsuits that will accompany that when someone who shouldn't have access to the server gets access.
ASKER
EXCELLENT! Thanks capricorn1 for the speedy response! It's just what I was looking for!
Shell "explorer.exe C:\ScannedFiles\" & [forms]![frmSomeForm]![Som