B
Billp
Hi,
I have so far got
Dim strSql As String 'SQL Satement
strSql = "INSERT INTO [tblCustomerContacts] " & _
"SELECT * " & _
"FROM [tblCustomerContacts] WHERE [CustomerID] = " &
Me!Cust_Alias_ID.Column(0) & ";"
DBEngine(0)(0).Execute strSql, dbFailOnError
The main form/table has an Autonumber ID called "Customer_Record_ID" and is
the main key.
A feild called "CustomerID" is a unique 6 letter identifier for the form.
The subtable is linked to the main form/table via "CustomerID" in a many to
one.
Upon selecting the "CustomerID" via a combo box I am trying to copy all
records in a subtable relating to that 'CustomerID" and paste them into the
new subform as part of the new record under the new "CustomerID".
The new records are a duplicate of the old reference. Say the old refernce
had 9 records - I need those 9 reords to copy to the new subform and to be
linked to it by the new "CustomerID".
I am not having much luck.
I have looked at Allen Brownes duplicate example - to no avail.
Any help really really appreciated.
I have so far got
Dim strSql As String 'SQL Satement
strSql = "INSERT INTO [tblCustomerContacts] " & _
"SELECT * " & _
"FROM [tblCustomerContacts] WHERE [CustomerID] = " &
Me!Cust_Alias_ID.Column(0) & ";"
DBEngine(0)(0).Execute strSql, dbFailOnError
The main form/table has an Autonumber ID called "Customer_Record_ID" and is
the main key.
A feild called "CustomerID" is a unique 6 letter identifier for the form.
The subtable is linked to the main form/table via "CustomerID" in a many to
one.
Upon selecting the "CustomerID" via a combo box I am trying to copy all
records in a subtable relating to that 'CustomerID" and paste them into the
new subform as part of the new record under the new "CustomerID".
The new records are a duplicate of the old reference. Say the old refernce
had 9 records - I need those 9 reords to copy to the new subform and to be
linked to it by the new "CustomerID".
I am not having much luck.
I have looked at Allen Brownes duplicate example - to no avail.
Any help really really appreciated.