Search results

  1. S

    Wierd problem with DoCmd.TransferText acImportDelim

    I have a small script that imports from a CSV file into a table in A2007. Private Sub cmdImportColisRefSendEmail_Click() DoCmd.RunSQL "Delete * FROM Colissimo_envoye" ' empty the sent colissimo table DoCmd.TransferText acImportDelim, "Import-colissimo-colis-ref Specification"...
  2. S

    problme with script for printing

    Solved (Re: problme with script for printing) I soved my problem. Apart from the syntax of the WHERE part of the DoCmd.OpenReport there was another fundamental problem. I should have been selecting the correct records in VBA before the DoCmd.OpenReport otherwise each non valid record throws up...
  3. S

    problme with script for printing

    It seems that each time the DoCmd.OpenReport is executed all the records that match the tblInv.InvSendEmail=True cirteria are printed once. This is repeated for each pass of the Do While Not .EOF .... Loop I need it to print only one record that matches both the tblInv.InvSendEmail=True AND...
  4. S

    problme with script for printing

    Below is a revised version. The tblInv.InvSendEmail=True part of the WHERE in the DoCmd.OpenReport seems to work as it only selects records that have InvSendEmail=True. However all the records that have InvSendEmail=True are printed many many times. What I need is that they are printed...
  5. S

    problme with script for printing

    Ah.. so the filtering must be applied in the DoCmd.OpenReport and not in the CurrentDb.OpenRecordset querry. Changing the DoCmd.OpenReport does indeed only select the records with tblInv.InvSendEmail=True. However it seems to go around the loop and "infinite" number of times and not drop out...
  6. S

    problme with script for printing

    I don't think the problem is with the DoCmd.OpenReport Because if I use the following DoCmd.OpenReport "rptInv", acViewNormal, , "InvNum = ![InvNum]" Then it prompts for the value of !InvNum and if I enter a valid value the record is printed correctly - which implies the DoCmd.OpenReport...
  7. S

    problme with script for printing

    inserting a space before FROM and after tblInv produces this string (using Debug.Print PrintInvoiceQuery) SELECT [InvNum] FROM tblInv WHERE tblInv.InvSendEmail=True However it now seems there is no value for ![InvNum] passed to the rptInv report since it prompts for a value. If I remove...
  8. S

    problme with script for printing

    Thanks for your prompt reply. debug.print PrintInvoiceQuery doesn't show anything.. whereever I put it.. Error 3131 says there is a syntax error in the FROM clause in the line Const PrintInvoiceQuery As String = "SELECT [InvNum]" & "FROM tblInv" & "WHERE tblInv.InvSendEmail=True" If the...
  9. S

    problme with script for printing

    Hello, I have a VBA script that selects records from the table tblInv where the value of tblInv.InvSendEmail=True and then sends the value of InvNum to the rptInv for each selected record. I am a bit bogged down with the SQL syntax. I get an Error 3131 "syntax error in FROM clause.." Any...
  10. S

    1 page report with 2nd page showing only text message

    Hi, I have a report which produces a single invoice on a single page. I want to add a second page showing only text (this is the T&Cs to be printed on the reverse side of the paper) at the end of the report. Is there a way I can do this in Access 2007 ?. thanks
  11. S

    INSERT INTO query problem

    I think I hit the Submit Reply button too soon.. Perhaps I am still getting duplicates becuase some of the fields listed after the GROUP BY may be null . I can't do anything about these null values since some fields are optional they may be left blank creating a null value. Is there a way...
  12. S

    INSERT INTO query problem

    Hi Bob, Thanks for your reply. If I add a GROUP BY stateemnt after the WHERE like this : INSERT INTO tblCust ( CustNum, CustLName, CustAddr1, CustAddr2, CustZip, CustCity, CustState, CustPhone, CustEmail, CustNote, LivLName, LivAddr1, LivAddr2, LivCity, LivZip, LivState, LivPhone ) SELECT...
  13. S

    INSERT INTO query problem

    I have an orders database in Access 2007 with several tables (tblCust, tblInv and tblInvDetail) containing customer information, order information and order details respectively. I want to add orders which are imported via a temporary table (Import_VmOrderListFile) using several queries. The...
  14. S

    update several fields in table_a from table_b based on a text field match

    Hi, Now sorted. I now know to include the second table after the UPDATE command. Many thanks for your help.
  15. S

    update several fields in table_a from table_b based on a text field match

    Hi, Thanks for your quick replies. Here is the actual code UPDATE tblInv SET InvPayType = "PayPal", InvPayNo = Télécharger_paypal.Numéro, InvPayAmm = Télécharger_paypal.Montant WHERE InvNote=Télécharger_paypal.Email And InvPayTrue=False; When I run the query it asks for the value of...
  16. S

    update several fields in table_a from table_b based on a text field match

    Hello, I want to update several fields in table_a from table_b based on a text field match (where table_a.text = table_b.text). Does anyone know if I can do this with the SQL UPDATE command ?. I have tried using this : UPDATE table_a SET x = table_b.1, y = table_b.b, z = table_2.c...
  17. S

    [Access] How to create tables in emails using VBA in access?

    Hi, I am interested in using your demo module. However when I type : Call ReportToOutlookBody <Enter> in the Immediate Window I get a Compile error. "User define type not defind." with the following row highlighted Dim olApp As Outlook.Application I am not familiar with Visual Basic. Do...
  18. S

    Sending a report by mail

    Hi, Did you find a solution to the problem of embedding the report in the body of an email ?. I need to do something similar for customer orders.. thanks
  19. S

    New to Access 2007 :would like some advice / guidance - thanks

    Hello, I am new to Access 2007 but I have used Access before (albeit a long time ago) and have some basic skills in html/php and I am quite familiar with Excel tables etc.. so I am not a complete novice. I have a web site with a simple shopping cart function that can export a csv file. I want...
Back
Top Bottom