Benvor
asked on
Delphi and MS Access lookup value
Hi Experts.
Is it possible to get the value of the row source of a MS Access table, inside Delphi?
If possible, how do I implement this value into my Delphi database project, using a normal ADOTable, DataSource and a DBGrid, or any other object.
untitled1.bmp
Is it possible to get the value of the row source of a MS Access table, inside Delphi?
If possible, how do I implement this value into my Delphi database project, using a normal ADOTable, DataSource and a DBGrid, or any other object.
untitled1.bmp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim dbs As DAO.DAtabase
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim i As Integer
Set dbs = OpenDatabase("Path to your db")
Set tdf = dbs.TableDefs("YourTableNa
Set fld = tdf.Fields("YourFieldName"
For i = 0 to fld.Properties.Count
If fld.Properties(i).Name = "RowSource" Then
'/this is the RowSource value
End If
Next i