Thanks to all who responded. Here is the solution:
With objDoc.MailMerge
.MainDocumentType = wdFormLetters
.Destination = wdSendToNewDocument
.OpenDataSource _
Name:="G:\ Location\Db.accdb", _
sqlstatement:="SELECT * FROM [tblSource]"
.Execute
End With...
The parts of the code missing are the value assignments for those variables.
strMergeFile is set by the user from a combo box after update event; strFileName is set in that same event. strFilePath is set by the user to point to the folder where the new document is to be saved.
I didn't...
Thanks for the reply.
strMergeFile is the name of the word document (template) used in the merge; it is set up to use a temporary table created earlier in the process.
strFilename is the name the merged document is to be save as; strFilePath defines the location where the document is to be...
In earlier versions of access, this code worked fine to merge and save a document.
Private Sub cmdMerge_Click()
Dim strFileName As String
Dim strFilePath As String
Dim strMergeFile As String
Dim objWord As New Word.Application
Dim objDoc As Word.Document
objWord.Application.Visible =...
Memo fields in a union query are being truncated to 255 characters.
Is this a known issue with Access 2K?
Is there a fix/work around to correct this?
Thanks.
Larry De Laruelle
I have found a solution. It's not as elegant as I would have liked, but it works.
Created a global variable to hold the value for the field height.
In the event to open ReportA, after the DoCmd.Open, I test the value of the global variable and if it exceeds the established maximum I issue...
lameid:
What I am testing is the size of a 'can grow' control in the detail section and the test needs to happen in the on print event.
The report is an invoice with horizontal and vertical lines and the description may be longer than the set field size. I've not found a way to...
In ReportA, I have a test in the detail_format event that, when evaluated as true, will open ReportB. What I would like to do is then close ReportA.
I have tried 'DoCmd.Close acReport, "ReportA"' but receive run time error 2585 "This action can't be carried out while processing a form or...
We are using an application called bmail to send help desk notices to the appropriate department. The email are sent to an external account (dept@fccin.org). The 'from' line is populated with the user's name captured as Environ("UserName"). This format is correct for internal email.
Upon...
Remou:
Thanks for the reply and the code.
Works like a champ. I guess I was on the right track, just did not have the syntax correct.
Thanks again.
Larry De Laruelle
Is it possible to change a subform's recordsource from the main form? Based on user choices, I want to change the query behind the sub form or, alternatively, use and sql string in record source. I've tried:
frmSubForm.recordsource =
or
me.formSubForm.recordsource =
both produce an error...
It compiles with no problem without the presence of the date() function. I can't use the function in any query/form and save it to try compiling with the function in one of those objects.
I noticed yesterday that I am using the Date() function in vb code when writing a record to a table...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.