Public Function GetTablePrimaryKeyColNameList (
TableName As String,
dbs As DAO.Database ,
Optional Delimiter As String = ", ",
Optional AddAutonumAsterisk As Boolean = False
) As String
Return the column name(s) in the primary key as a comma separated list.
The delimiter to use in constructing the delimited string
The DAO database to which the table belongs
Add an asterisk at the right of the autonumber column's name
Dim s As String
s = xf.Scripter.GetTablePrimaryKeyColNameList(delimiter, TableName, dbs)
s = xf.Scripter.GetTablePrimaryKeyColNameList(delimiter, TableName, dbs, Delimiter, AddAutonumAsterisk)
colList = GetTablePrimaryKeyColNameList("tblProduct", dbs)