I am working with vb.net 2012 an access 2007 database to develop a simple DMS (Document Management System).
I have resolved how to create new entries and update the database with all the document properties, including its original path.
Now, what I need to do is to create a second form where users can select some searching criteria and click the button for a custom result. The results has to be displayed in a 'user friendly' form, as much as possible, this means that additionally to the query, the user has to be able to click somewhere in the form so he can 'open' the selected document from the resulting list (using the 'original_path' property).
Initially I am trying to use a DataGridView control because it looks simple and allows me to preview the results but I dont know how to pass a new query from my search form to the 'result form' (the one that has de DataGridView control).
I am using DataGridView control but if someone tells me there is a better control or a better way to do it, I am open to acccept his or her answer if it works.
The following code is the one I am using to update the access database:
dbProvider = "Provider=Microsoft.ACE.OLEDB.12.0;"
Dim folderPath As String
folderPath = My.Computer.FileSystem.CurrentDirectory
Dim filePath As String
filePath = "\main_db.accdb"
dbSource = "Data Source=" & folderPath & filePath
con.ConnectionString = dbProvider & dbSource
sql = "SELECT * FROM documents"
da = New OleDb.OleDbDataAdapter(sql, con)