G Guest Jul 13, 2005 #1 Is there some way to use a make table query and then define the primary key, other than going into the table and selecting it? Thanks!
Is there some way to use a make table query and then define the primary key, other than going into the table and selecting it? Thanks!
B Brendan Reynolds Jul 13, 2005 #2 Public Sub TestCreateIndex() Dim strSQL As String strSQL = "CREATE INDEX PrimaryKey ON tblTest (TestID) WITH PRIMARY" CurrentDb.Execute strSQL End Sub See the following help topic for more info ... http://office.microsoft.com/assistance/hfws.aspx?AssetID=HP010322171033
Public Sub TestCreateIndex() Dim strSQL As String strSQL = "CREATE INDEX PrimaryKey ON tblTest (TestID) WITH PRIMARY" CurrentDb.Execute strSQL End Sub See the following help topic for more info ... http://office.microsoft.com/assistance/hfws.aspx?AssetID=HP010322171033