Recordset Dim s QRY As String Dim str File Path As String str File Path = “C:\Database Folder\my DB.accdb” rs. Open s QRY, cnn, ad Open Static, ad Lock Read Only Application. Learning anything new has always been my passions and if its related to Business and Technology then, I love it. I'm currently working in a MNC in Bangalore, India.The Do Events built-in function is used to pass control onto the operating system to ensure messages are processed.
To do this we will put the file path into a cell reference and then reference that cell location to gain the path at any time or location.Before we start we need to have a little database that we can send and retrieve data to and from.Create a simple database as shown in the previous tutorial.The adjacent Cell I2 will contain the search criteria for our code.Hit ALT F11 to open the VBA editor in Microsoft Excel and then also you can repeat this process in your Microsoft access program as well.