Changing Field Type

F

FBxiii

Hi.

I have a db that holds a large number of tables. Each table has its own
unique Record_ID.

I want to be able to determine (in code) wether the Record_ID is set to the
Primary key and if not, change it to the Primary key.

I have been playing around with the TableDefs object but cant work it out.

Can anyone help?

Cheers,
Steve.
 
S

Stefan Hoffmann

hi,
I want to be able to determine (in code) wether the Record_ID is set to the
Primary key and if not, change it to the Primary key.
I have been playing around with the TableDefs object but cant work it out.
Take a look at the Indexes property of your TableDef objects.


mfG
--> stefan <--
 
F

FBxiii

Thanks for the reply.

I used the tabledef.Indexes.Count property to work out wether the primary
key was set (Indexes.Count = 0). If it wasnt, I have ran a definition query
to change it.

Ta!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top