I want to copy records from a subform that have a Check in the "MakeQAQC" field. But I need to make the new records have a "QA" added to the Number field. Is there a way to add extra text using this Insert or ???
hope that makes sense
I would much rather a single "Insert" than use a for next loop and have all the fields strung out
here is my code
DougP, MCP, A+
I Built my own R2D2
I love this site and all you folks that helped me over the years!
hope that makes sense
I would much rather a single "Insert" than use a for next loop and have all the fields strung out
here is my code
Code:
Dim Conn2 As ADODB.Connection
Dim Rs1 As ADODB.Recordset
Dim SQLcode, SQLcode2 As String
Set Conn2 = CurrentProject.Connection
Set Rs1 = New ADODB.Recordset
SQLcode = "INSERT INTO [ChainOfCustody Details] ( MaterialDescription, HomogeneousAreaLocation, SampleLocation, Quantity ) " & _
"SELECT * " & _
"FROM [ChainOfCustody Details] " & _
"WHERE ((([ChainOfCustody Details].MakeQAQC)=-1) AND " & _
"(([ChainOfCustody Details].[Project Number])='" & Me![Project Number] & "') " & _
"AND (([ChainOfCustody Details].Service)='" & Me![Service] & "') " & _
"AND (([ChainOfCustody Details].Number)='" & Me![Number] & "') " & _
"AND (([ChainOfCustody Details].[Building Name])='" & Me![Building Name] & "'));"
Rs1.Open SQLcode, Conn2, adOpenStatic, adLockOptimistic
' close it this way
Set Rs1 = Nothing
Set Conn2 = Nothing
DougP, MCP, A+
![[r2d2] [r2d2] [r2d2]](/data/assets/smilies/r2d2.gif)
I love this site and all you folks that helped me over the years!