i am trying to open a windows folder from access (2016) and only display some files. The folder contains 1000's of files, (client files) the all start with the client ref number EG G12345 or H12456 then a space then what the file is. I want to open the folder and only show the files for the current client on access.
I want d:\data\clients\correspondence\G12345*.*
I currently have a button on the client page that does this (cRef = Client Ref)
Foldername = "d:\data\clients\correspondence\" & cRef & "*.*"
Shell "C:\WINDOWS\explorer.exe """ & foldername & "", vbNormalFocus
But it just opens my default file location (C:\documents) what am I doing wrong. Thanks