PRIMARY KEY with MAKETABLE command
I have a very useful function used for append purposes. Unfortunately i have no primary key in the
newly made table called orders 2 and hence i have problems with the appendments.Is it possible to
make the field orderid in the table orders2 with primary key ? The field orderid in the original table called orders1 has a primary key,
but this key is not inherited in the table orders2
I am using the following function:
Public Function Stock()
Private Const strDepotWhere As String = ” WHERE ((([orders1].[orderdate])>#1/1/2002#));”
Dim strOrders As String
strOrders = ” SELECT orders1.orderid, orders1.customerid, orders1.orderdate INTO orders2 FROM orders1″
CurrentDb.Execute strOrders & strDepotWhere
Is it possible to place the command PRIMARY KEY somehere in my strOrders line ?
I will be grateful for any reply