Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim db As New ADODB.Connection
Dim resultsRS As New ADODB.Recordset 'open your database connection first Function getPrimaryKeyName$(tableName$) Set resultsRS = db.OpenSchema(adSchemaPrimaryKeys, Array(Empty, Empty, tableName)) getPrimaryKeyName = resultsRS !COLUMN_NAME End Function I know that people often want to know how to do that (because I did) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Recordset with Primary Key | Excel Programming | |||
Pivot Table Code - Simple Code Fix? | Excel Programming | |||
Code for a Macro that allows a Pivot table to be repeatedly run (fora dynamic rows in a table, but static field names) | Excel Programming | |||
Export excel table to acess table using VBA Code | Excel Programming | |||
VBA Code for a pivot table to open database and to reference table current page | Excel Programming |