Using the code below I am able to open an explorer window from access and select most of a file path. The part I am not able to get is "LN" which is a field in my forms. I need to be able to pull the current LN number into my Modules file path. How do I do this? Is it easier to go by ID or the actual field I am looking for?
Dim rs As Recordset
Dim LN As String
Dim Client_Name As String
Dim RetVal As String
Dim LFPath As String
Set rs = CurrentDb.OpenRecordset("SELECT ID, LN, Client_Name FROM [Loan_Info_local]")
LN = rs![LN]
Client_Name = rs![Client_Name]
Select Case Client_Name
Case "Bank of David, N.A."
LFPath = "\\MAXSERVER\Max Default\BOD\"
RetVal = Shell("explorer.exe " & LFPath & LN, vbNormalFocus)
Set rs = Nothing
End FunctionCurrently, it keeps pulling the first reccord, no matter what reccord I'm on.