Search results

  1. T

    parameter query 2010

    Hi Sharif. Have you changed your database from .mdb to .accdb? If so, then your parameter queries will no longer work with mailmerge! Gina Whipp (from this forum) recommended Albert Kallal's excellent solution (http://www.kallal.ca/wordmerge/index.html) Alternatively, trying exporting your query...
  2. T

    Recreate old-style parameter query mail merge

    Hi Gina, I have tried (and failed) to create my own VBA project. I have applied Albert's code to my problem and found it very useful (as you told me it would be!). It works with queries based on multiple tables and I find the MergeNo Prompts to be excellent. Just a couple on questions on the...
  3. T

    Create Email from MSAccess

    Hi Brian006, Your problem is similar to mine. Word merge from a form. Post-2007 Access would allow you to merge from a Parameter Query (your query filters what you want using a formula like [Forms]![MyForm]![Email]), but post-2007 no longer allows this. I believe you need to create some VBA...
  4. T

    Mail Merge from a Form

    I have been trying to create VBA code to mail merge to a Word document from a Form. There are plenty of examples out there but nothing that I can make work. My closest attempt is the following code, but I get “Run time error ‘424’ – Object required” at the ‘MailMerge.OpenDataSource’ line. Does...
  5. T

    Recreate old-style parameter query mail merge

    Hi, I haven't given up! I am trying a new tack. The MailMerge.OpenDataSource method seems to allow you to specify the SQL statement so I have altered the code like this: Private Sub TestButton_Click() ' Opens Word Document Dim wrdApp As Object Set wrdApp = CreateObject("Word.Application")...
  6. T

    Recreate old-style parameter query mail merge

    Hi Gina, Word opens OK (with my text.docx), but the code runs into a problem with the 'ActiveDocument.MailMerge.OpenDataSource' section. I get 'runtime error 424 object required'. Albert's code is a bit complex for me. I think that it creates a mail merge with info from a single form, but my...
  7. T

    Recreate old-style parameter query mail merge

    When I run this now, it gets as far as the 'open the MERGE' section then an error message says 'Object required'. Does this mean there is no value in strSQL or is the ActiveDocument.MailMerge.OpenDataSource configured wrongly?
  8. T

    Recreate old-style parameter query mail merge

    I added square brackets around the table name and a space before 'FROM'. By using Debug.Print strSQL I can see the SELECT query. Seems to be OK. How do I see the returned value ('Lead Name') rather than the SELECT query itself, if it is indeed returning one? I tried MsgBox strSQL, but that...
  9. T

    Recreate old-style parameter query mail merge

    Hi Gina, I had a go at the VBA, but the Test.docx is not referring to the strSQL as a Data Source. Here's my code: Private Sub TestButton_Click() Dim strSQL As String strSQL = "SELECT [Lead Name]" & _ "FROM Green Book " & _ "WHERE ((([Green Book].[Reference...
  10. T

    date change based on time.

    The date will change at 1200 midnight. If you want tomorrow's date to start at 0700am then use the time - 7 hours as your display.
  11. T

    Recreate old-style parameter query mail merge

    Thanks, Gina I will work on the SQL and then figure out the Word Merge in VBA. Ideally I'd like a button that takes you right through to the completed merge. I see there are some posts on this topic, so I'll read up. Albert Kallal's article is for mdb and I'm using a accdb. Also my query is...
  12. T

    Recreate old-style parameter query mail merge

    Thanks, Gina. I really appreciate your advice. You are saying forget about my existing query and create one using SQL, and use that as the basis of a Word Merge. Great, it's good to be put on the right track. I will read up on using VBA (I presume it can be an array) in Word Merge. Cheers, Peter
  13. T

    Recreate old-style parameter query mail merge

    Hi, I am trying to create VBA code (I have very little experience of VBA) to recreate a parameter query mail merge, which Access 2013 cannot achieve with the controls provided. I think that I need to assign a variable to the value of a control on my form then assign that variable to the...
  14. T

    Hello!

    Hi, I am a Tour Operator (unsurprisingly!). Over 17 years I have worked with Microsoft Access to build complex databases. Our website has led me to learn HTML, CSS, PHP, MySQL and JavaScript (JQuery). When we upgraded from Access 2003 to 2013, all went well except for many mail merge letters...
Top Bottom