Avatar of DerFuzh
Flag for United States of America

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]![SomeField]......?

Private Sub openDirectory_Click()

    Shell "explorer.exe C:\ScannedFiles\........", vbNormalFocus

End Sub

Any help is greatly appreciated!
Microsoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon