I have a program where the user clicks a button on the Customer screen that will send a record to another database in another folder on a shared drive. It also opens a dialogue box that asks them if they want to copy relevant records over to that folder.
When the button is clicked, it copies the CustID.
Dialogue box opens.
If yes is selected, the folder where the files are stored opens.
The user pastes the CustID in the search box at the top.
All files with that CustID are displayed.
The user right clicks on the files they want to copy over.
User selects Send To and picks the destination folder.
Is there a way to have the CustID automatically paste into the Search box?
Here is the code I use.
START OF CODE
Dim LFResponse As Integer
LFResponse = MsgBox("Do you want to open the Linked files folder? If yes," & vbCrLf & vbCrLf & _
"1 - Remember to paste the CustID into the Search Box by right clicking on it" & vbCrLf & _
"2 - Choose paste, and" & vbCrLf & _
"3 - Right click on the files that show up" & vbCrLf & _
"4 - Left click on Send To" & vbCrLf & _
"5 - Choose LinkFiles", vbYesNo, "Continue")
If LFResponse = vbYes Then
Dim Foldername As String
Foldername = "\\Folder1\Folder2\Folder3\Folder4\Folder5\Folder6\"
Shell "C:\WINDOWS\explorer.exe """ & Foldername & "", vbNormalFocus
Else
Cancel = True
End If
END OF CODE
When the button is clicked, it copies the CustID.
Dialogue box opens.
If yes is selected, the folder where the files are stored opens.
The user pastes the CustID in the search box at the top.
All files with that CustID are displayed.
The user right clicks on the files they want to copy over.
User selects Send To and picks the destination folder.
Is there a way to have the CustID automatically paste into the Search box?
Here is the code I use.
START OF CODE
Dim LFResponse As Integer
LFResponse = MsgBox("Do you want to open the Linked files folder? If yes," & vbCrLf & vbCrLf & _
"1 - Remember to paste the CustID into the Search Box by right clicking on it" & vbCrLf & _
"2 - Choose paste, and" & vbCrLf & _
"3 - Right click on the files that show up" & vbCrLf & _
"4 - Left click on Send To" & vbCrLf & _
"5 - Choose LinkFiles", vbYesNo, "Continue")
If LFResponse = vbYes Then
Dim Foldername As String
Foldername = "\\Folder1\Folder2\Folder3\Folder4\Folder5\Folder6\"
Shell "C:\WINDOWS\explorer.exe """ & Foldername & "", vbNormalFocus
Else
Cancel = True
End If
END OF CODE