make table query with primary key

anzacks

Registered User.
Local time
Tomorrow, 02:47
Joined
Mar 14, 2008
Messages
18
Hi,

Anyone has the idea of creating primary key in a table using make table query?

Thanks.:confused:
 
Hi,

Anyone has the idea of creating primary key in a table using make table query?

Thanks.:confused:

No.
Have you tried creating a table structure with PK directly? Something like this:
Code:
Sub CreateIndexSample()

'
Dim x As String
x = "CREATE TABLE Employees " _
& "(First_Name TEXT(20), Last_Name TEXT(25), " _
& " dob DATETIME, " _
& "Constraint Employees_PK Primary Key (First_Name, Last_Name, dob));"

Dim db As DAO.Database
Set db = CurrentDb
db.Execute x

End Sub
 

Users who are viewing this thread

Back
Top Bottom