Recent content by Agnister

  1. A

    Question Insert data from one table into a different field in another table

    Gentlemen I added a WHERE statement and everything worked. Here is my edited code. db.Execute "INSERT INTO tbl_SumMonth ([Credit]) SELECT tbl_TmpTrans_ByDate.[Total_Amount]" & _ " FROM tbl_TmpTrans_ByDate" & _ " WHERE tbl_TmpTrans_ByDate.[NQCG_Month] = 'Jan-19';" MsgBox "Table tbl_SumMonth...
  2. A

    Question Insert data from one table into a different field in another table

    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...
  3. A

    Sum Total data and Save to a table with VBA

    ypma It works exactly the way I wanted to. Thanks again
  4. A

    Sum Total data and Save to a table with VBA

    ypma My apologies. I did not see the attachment NewTest.accdb. This does what I want. Thank you
  5. A

    Sum Total data and Save to a table with VBA

    ypma I made an attempt at your suggestion but crashes on the Set rs = db.OpenRecordset(strSQL). The make Table works but the first section crashes. What do you think is wrong with my code. Private Sub cmd_SumQry_Click() Dim db As Database Dim rs As DAO.Recordset Dim strQry As String Dim...
  6. A

    Sum Total data and Save to a table with VBA

    This is my test data (qry_Income_ByDate) NQCG_Month Category Amount Jan-19 Credit $70 Jan-19 Credit $20 Jan-19 Debit $245 Jan-19 Credit $60 I want to perform the following: 1. DSum the [Amount] according...
  7. A

    CREATE TABLE within VBA

    Thank you all as the entire input discussion as it has been very intuitive. Gina Whipp you minor change worked a treat but Doc Man raised an interesting point about "DB Bloat". Something I was not aware of and this escalated the discussion into "Side-ends" and ended with a very interesting...
  8. A

    Tip The Ten Commandments of Access

    I love it oh "Wise Man". I shall abide by your commandments
  9. A

    CREATE TABLE within VBA

    I want to create a temporary table with the SQL "CREATE TABLE" option within VBA and use the Execute command instead of DoCmd.RunSQL. I just want the Table structure without any records. The code fails on the Execute command. I can not see anything wrong with this code. Please help Dim db As...
  10. A

    Substituting a record into a DoCmd

    Thank you all for your help especially Cronk. I have solved my problem. It took me a while to realise that the Hyperlinks were causing my problem. Thanks again
  11. A

    Substituting a record into a DoCmd

    Anyone Will this Dlookup work if the field "Email" is in the table as a hyperlink field ' Email report to each club member ********* Dim strEmail As String strEmail = DLookup("Email", "qry_receipts") ' strEmail = "resval@iinet.net.au" DoCmd.SendObject acReport, strReport, acFormatPDF...
  12. A

    Substituting a record into a DoCmd

    Cronk I am using Outlook as my email host
  13. A

    Substituting a record into a DoCmd

    Cronk I got the DLookup to work for a simple field like "Last_Name" in another script but could not get it to work for an email address. When I substituted the Dlookup .... for a real email address it worked. Is there something different about email addresses in a Dlookup? ' Email report to...
  14. A

    Substituting a record into a DoCmd

    Thank you everyone for your replies. I am about to work through your suggestions and I will get back to you shortly
Top Bottom