This is very much possible. You will have to open connection to the database and use the specific fields from the File (once you get the data from the file) to search in the database using a query.
Some thing similar to this will help
Code:
Dim iFile As Integer, strLine As String
Dim sVar As String ' a variant
iFile = FreeFile
Open strFilename For Input Access Read Lock Read Write As #iFile
' Loop through each line, looking for the key
Do Until EOF(iFile)
Line Input #iFile, strLine
'To get the specific fields you can either use MID function, or the split.
'say if i have to get the data from 10th position of the line till 15th position, i will do like this
sVar = Mid(strLine, 10, 5)
'use svar to search for the data in the database
rs.Open "Select from SOMETABLE Where FIELD = '" & sVar & "'", databaseConnection
If Not rs.EOF Then
'data is present show it in the datagrid
End If
Loop
try to read through the code and see what exactly is happening. This will give you an idea atleast of wha needds to be done.