S
Stu Dongel
hello all,
i have the folowing snippet that s giving me problems, i think it is with my
sql string.
Private Sub Command14_Click()
Dim strSQL As String
strSQL = "INSERT INTO tblTransactions ( [Brother ID], [Date], Type, Amount,
Designation, Description )" & _
"SELECT tblBrotherInfo.ID, [forms]![frmGlobalCharge]![txtDate] AS Expr1,
[forms]![frmGlobalCharge]![cboType] AS Expr2,
[forms]![frmGlobalCharge]![txtAmount] AS Expr3,
[forms]![frmGlobalCharge]![cboDesignation] AS Expr4,
[forms]![frmGlobalCharge]![txtDescription] AS Expr5 " & _
"FROM tblBrotherInfo LEFT JOIN tblTransactions ON tblBrotherInfo.ID =
tblTransactions.[Brother ID]; "
MsgBox stSQL
DoCmd.RunSQL strSQL
End Sub
Im trying to get this query to creat a record in tbltransaction for every
brother in tblbrother info. It acts quirky. there are 19 record in
tblbrotherinfo. I run this code, and it creates 19 records the first and
second time. after that the number of records it create doubles everytime i
run the code. wierd. anyone know what is wrong with this?
thanks so much in advance.
stu
i have the folowing snippet that s giving me problems, i think it is with my
sql string.
Private Sub Command14_Click()
Dim strSQL As String
strSQL = "INSERT INTO tblTransactions ( [Brother ID], [Date], Type, Amount,
Designation, Description )" & _
"SELECT tblBrotherInfo.ID, [forms]![frmGlobalCharge]![txtDate] AS Expr1,
[forms]![frmGlobalCharge]![cboType] AS Expr2,
[forms]![frmGlobalCharge]![txtAmount] AS Expr3,
[forms]![frmGlobalCharge]![cboDesignation] AS Expr4,
[forms]![frmGlobalCharge]![txtDescription] AS Expr5 " & _
"FROM tblBrotherInfo LEFT JOIN tblTransactions ON tblBrotherInfo.ID =
tblTransactions.[Brother ID]; "
MsgBox stSQL
DoCmd.RunSQL strSQL
End Sub
Im trying to get this query to creat a record in tbltransaction for every
brother in tblbrother info. It acts quirky. there are 19 record in
tblbrotherinfo. I run this code, and it creates 19 records the first and
second time. after that the number of records it create doubles everytime i
run the code. wierd. anyone know what is wrong with this?
thanks so much in advance.
stu