I have a table tbl_TmpTrans_ByDate with the following data
NQCG_Month Category Total_Amout
Jan-19 Credit $220
And I have a master table tbl_SumMonth with fields
NQCG_Month Credit Debit ...........etc
I want to insert into the credit field in tbl_SumMonth the Total_Amount ($220) from tbl_TmpTrans_ByDate. Can anyone please see what is wrong with my code
They are both Currency fields
Private Sub cmd_SumQry_Click()
Dim db As Database
Dim rs As DAO.Recordset
Dim strQry As String
Dim strNewTable As String
Dim strSQL As String
strNewTable = "tbl_TmpTrans_ByDate"
strQry = "qry_Income_ByDate"
Set db = CurrentDb
db.Execute "INSERT INTO tbl_SumMonth ([Credit]) SELECT tbl_TmpTrans_ByDate.[Total_Amount]" & _
" FROM tbl_TmpTrans_ByDate;"
Set db = Nothing
End Sub
NQCG_Month Category Total_Amout
Jan-19 Credit $220
And I have a master table tbl_SumMonth with fields
NQCG_Month Credit Debit ...........etc
I want to insert into the credit field in tbl_SumMonth the Total_Amount ($220) from tbl_TmpTrans_ByDate. Can anyone please see what is wrong with my code
They are both Currency fields
Private Sub cmd_SumQry_Click()
Dim db As Database
Dim rs As DAO.Recordset
Dim strQry As String
Dim strNewTable As String
Dim strSQL As String
strNewTable = "tbl_TmpTrans_ByDate"
strQry = "qry_Income_ByDate"
Set db = CurrentDb
db.Execute "INSERT INTO tbl_SumMonth ([Credit]) SELECT tbl_TmpTrans_ByDate.[Total_Amount]" & _
" FROM tbl_TmpTrans_ByDate;"
Set db = Nothing
End Sub