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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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,222,196
Messages
6,164,520
Members
451,900
Latest member
lamski

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