Create a Primary key in a Query

Swifey

Active Member
Joined
Jan 16, 2003
Messages
421
Is it possible within a query design view to create a table with a primary key?

The reason why I ask is that when I update my table queries I have to delete my relationships between my tables created in a query design view.

As you can appreciate indexing can cut down the processing time by half.

Kind regards
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi
Can you explain what it is you are trying to do? What are the queries doing?
Andrew
 
Upvote 0
Within a query design view I create a table to another users database which contains customer sales figures.

The users links other tables which contain primary keys on cusno.to the one I create. If they create a relationship it stops me from refreshing there data.
 
Upvote 0
Unless I'm misunderstanding the set-up, can you create the table in your database and have the other users links their databases to yours? They would have a linked table in their database and as you add data to the table in your database, the data would appear in their database without any need to change / delete the relationships.
Andrew
 
Upvote 0
Hi

Is it possible/practical for you to update your query definition(s) through VBA using the querydef object?

Martin
 
Upvote 0

Forum statistics

Threads
1,214,647
Messages
6,120,722
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top